import{S as ax,i as ix,s as lx,e as n,k as l,w as F,t as a,M as dx,c as r,d as o,m as d,a as s,x as v,h as i,b as c,F as e,g as h,y,q as T,o as w,B as b}from"../../chunks/vendor-4833417e.js";import{T as be}from"../../chunks/Tip-fffd6df1.js";import{D as N}from"../../chunks/Docstring-4f315ed9.js";import{C as Me}from"../../chunks/CodeBlock-6a3d1b46.js";import{I as xe}from"../../chunks/IconCopyLink-4b81c553.js";import"../../chunks/CopyButton-dacfbfaf.js";function cx(P){let p,R,g,_,$;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=a("Module"),$=a(`
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){p=r(k,"P",{});var f=s(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(f,"CODE",{});var M=s(g);_=i(M,"Module"),M.forEach(o),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(k,f){h(k,p,f),e(p,R),e(p,g),e(g,_),e(p,$)},d(k){k&&o(p)}}}function px(P){let p,R,g,_,$;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=a("Module"),$=a(`
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){p=r(k,"P",{});var f=s(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(f,"CODE",{});var M=s(g);_=i(M,"Module"),M.forEach(o),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(k,f){h(k,p,f),e(p,R),e(p,g),e(g,_),e(p,$)},d(k){k&&o(p)}}}function mx(P){let p,R,g,_,$;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=a("Module"),$=a(`
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){p=r(k,"P",{});var f=s(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(f,"CODE",{});var M=s(g);_=i(M,"Module"),M.forEach(o),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(k,f){h(k,p,f),e(p,R),e(p,g),e(g,_),e(p,$)},d(k){k&&o(p)}}}function hx(P){let p,R,g,_,$;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=a("Module"),$=a(`
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){p=r(k,"P",{});var f=s(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(f,"CODE",{});var M=s(g);_=i(M,"Module"),M.forEach(o),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(k,f){h(k,p,f),e(p,R),e(p,g),e(g,_),e(p,$)},d(k){k&&o(p)}}}function fx(P){let p,R,g,_,$;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=a("Module"),$=a(`
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){p=r(k,"P",{});var f=s(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(f,"CODE",{});var M=s(g);_=i(M,"Module"),M.forEach(o),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(k,f){h(k,p,f),e(p,R),e(p,g),e(g,_),e(p,$)},d(k){k&&o(p)}}}function ux(P){let p,R,g,_,$;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=a("Module"),$=a(`
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){p=r(k,"P",{});var f=s(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(f,"CODE",{});var M=s(g);_=i(M,"Module"),M.forEach(o),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(k,f){h(k,p,f),e(p,R),e(p,g),e(g,_),e(p,$)},d(k){k&&o(p)}}}function gx(P){let p,R,g,_,$;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=a("Module"),$=a(`
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){p=r(k,"P",{});var f=s(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(f,"CODE",{});var M=s(g);_=i(M,"Module"),M.forEach(o),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(k,f){h(k,p,f),e(p,R),e(p,g),e(g,_),e(p,$)},d(k){k&&o(p)}}}function _x(P){let p,R,g,_,$,k,f,M,me,K,E,Z,O,oe,he,S,fe,le,J,L,te,G,z,q,re,B,de,se,W,ue,ce,j,ge,U,ae,ie,H,pe,X,I,ne,Q,_e;return{c(){p=n("p"),R=a("TF 2.0 models accepts two formats as inputs:"),g=l(),_=n("ul"),$=n("li"),k=a("having all inputs as keyword arguments (like PyTorch models), or"),f=l(),M=n("li"),me=a("having all inputs as a list, tuple or dict in the first positional arguments."),K=l(),E=n("p"),Z=a("This second option is useful when using "),O=n("code"),oe=a("tf.keras.Model.fit"),he=a(` method which currently requires having all the
tensors in the first argument of the model call function: `),S=n("code"),fe=a("model(inputs)"),le=a("."),J=l(),L=n("p"),te=a(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),G=l(),z=n("ul"),q=n("li"),re=a("a single Tensor with "),B=n("code"),de=a("input_ids"),se=a(" only and nothing else: "),W=n("code"),ue=a("model(inputs_ids)"),ce=l(),j=n("li"),ge=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),U=n("code"),ae=a("model([input_ids, attention_mask])"),ie=a(" or "),H=n("code"),pe=a("model([input_ids, attention_mask, token_type_ids])"),X=l(),I=n("li"),ne=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=n("code"),_e=a('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(m){p=r(m,"P",{});var x=s(p);R=i(x,"TF 2.0 models accepts two formats as inputs:"),x.forEach(o),g=d(m),_=r(m,"UL",{});var Y=s(_);$=r(Y,"LI",{});var $e=s($);k=i($e,"having all inputs as keyword arguments (like PyTorch models), or"),$e.forEach(o),f=d(Y),M=r(Y,"LI",{});var Fe=s(M);me=i(Fe,"having all inputs as a list, tuple or dict in the first positional arguments."),Fe.forEach(o),Y.forEach(o),K=d(m),E=r(m,"P",{});var C=s(E);Z=i(C,"This second option is useful when using "),O=r(C,"CODE",{});var we=s(O);oe=i(we,"tf.keras.Model.fit"),we.forEach(o),he=i(C,` method which currently requires having all the
tensors in the first argument of the model call function: `),S=r(C,"CODE",{});var ye=s(S);fe=i(ye,"model(inputs)"),ye.forEach(o),le=i(C,"."),C.forEach(o),J=d(m),L=r(m,"P",{});var Ee=s(L);te=i(Ee,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Ee.forEach(o),G=d(m),z=r(m,"UL",{});var A=s(z);q=r(A,"LI",{});var V=s(q);re=i(V,"a single Tensor with "),B=r(V,"CODE",{});var Re=s(B);de=i(Re,"input_ids"),Re.forEach(o),se=i(V," only and nothing else: "),W=r(V,"CODE",{});var ee=s(W);ue=i(ee,"model(inputs_ids)"),ee.forEach(o),V.forEach(o),ce=d(A),j=r(A,"LI",{});var D=s(j);ge=i(D,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),U=r(D,"CODE",{});var ze=s(U);ae=i(ze,"model([input_ids, attention_mask])"),ze.forEach(o),ie=i(D," or "),H=r(D,"CODE",{});var ve=s(H);pe=i(ve,"model([input_ids, attention_mask, token_type_ids])"),ve.forEach(o),D.forEach(o),X=d(A),I=r(A,"LI",{});var ke=s(I);ne=i(ke,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=r(ke,"CODE",{});var Te=s(Q);_e=i(Te,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Te.forEach(o),ke.forEach(o),A.forEach(o)},m(m,x){h(m,p,x),e(p,R),h(m,g,x),h(m,_,x),e(_,$),e($,k),e(_,f),e(_,M),e(M,me),h(m,K,x),h(m,E,x),e(E,Z),e(E,O),e(O,oe),e(E,he),e(E,S),e(S,fe),e(E,le),h(m,J,x),h(m,L,x),e(L,te),h(m,G,x),h(m,z,x),e(z,q),e(q,re),e(q,B),e(B,de),e(q,se),e(q,W),e(W,ue),e(z,ce),e(z,j),e(j,ge),e(j,U),e(U,ae),e(j,ie),e(j,H),e(H,pe),e(z,X),e(z,I),e(I,ne),e(I,Q),e(Q,_e)},d(m){m&&o(p),m&&o(g),m&&o(_),m&&o(K),m&&o(E),m&&o(J),m&&o(L),m&&o(G),m&&o(z)}}}function kx(P){let p,R,g,_,$;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=a("Module"),$=a(`
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){p=r(k,"P",{});var f=s(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(f,"CODE",{});var M=s(g);_=i(M,"Module"),M.forEach(o),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(k,f){h(k,p,f),e(p,R),e(p,g),e(g,_),e(p,$)},d(k){k&&o(p)}}}function Fx(P){let p,R,g,_,$,k,f,M,me,K,E,Z,O,oe,he,S,fe,le,J,L,te,G,z,q,re,B,de,se,W,ue,ce,j,ge,U,ae,ie,H,pe,X,I,ne,Q,_e;return{c(){p=n("p"),R=a("TF 2.0 models accepts two formats as inputs:"),g=l(),_=n("ul"),$=n("li"),k=a("having all inputs as keyword arguments (like PyTorch models), or"),f=l(),M=n("li"),me=a("having all inputs as a list, tuple or dict in the first positional arguments."),K=l(),E=n("p"),Z=a("This second option is useful when using "),O=n("code"),oe=a("tf.keras.Model.fit"),he=a(` method which currently requires having all the
tensors in the first argument of the model call function: `),S=n("code"),fe=a("model(inputs)"),le=a("."),J=l(),L=n("p"),te=a(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),G=l(),z=n("ul"),q=n("li"),re=a("a single Tensor with "),B=n("code"),de=a("input_ids"),se=a(" only and nothing else: "),W=n("code"),ue=a("model(inputs_ids)"),ce=l(),j=n("li"),ge=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),U=n("code"),ae=a("model([input_ids, attention_mask])"),ie=a(" or "),H=n("code"),pe=a("model([input_ids, attention_mask, token_type_ids])"),X=l(),I=n("li"),ne=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=n("code"),_e=a('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(m){p=r(m,"P",{});var x=s(p);R=i(x,"TF 2.0 models accepts two formats as inputs:"),x.forEach(o),g=d(m),_=r(m,"UL",{});var Y=s(_);$=r(Y,"LI",{});var $e=s($);k=i($e,"having all inputs as keyword arguments (like PyTorch models), or"),$e.forEach(o),f=d(Y),M=r(Y,"LI",{});var Fe=s(M);me=i(Fe,"having all inputs as a list, tuple or dict in the first positional arguments."),Fe.forEach(o),Y.forEach(o),K=d(m),E=r(m,"P",{});var C=s(E);Z=i(C,"This second option is useful when using "),O=r(C,"CODE",{});var we=s(O);oe=i(we,"tf.keras.Model.fit"),we.forEach(o),he=i(C,` method which currently requires having all the
tensors in the first argument of the model call function: `),S=r(C,"CODE",{});var ye=s(S);fe=i(ye,"model(inputs)"),ye.forEach(o),le=i(C,"."),C.forEach(o),J=d(m),L=r(m,"P",{});var Ee=s(L);te=i(Ee,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Ee.forEach(o),G=d(m),z=r(m,"UL",{});var A=s(z);q=r(A,"LI",{});var V=s(q);re=i(V,"a single Tensor with "),B=r(V,"CODE",{});var Re=s(B);de=i(Re,"input_ids"),Re.forEach(o),se=i(V," only and nothing else: "),W=r(V,"CODE",{});var ee=s(W);ue=i(ee,"model(inputs_ids)"),ee.forEach(o),V.forEach(o),ce=d(A),j=r(A,"LI",{});var D=s(j);ge=i(D,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),U=r(D,"CODE",{});var ze=s(U);ae=i(ze,"model([input_ids, attention_mask])"),ze.forEach(o),ie=i(D," or "),H=r(D,"CODE",{});var ve=s(H);pe=i(ve,"model([input_ids, attention_mask, token_type_ids])"),ve.forEach(o),D.forEach(o),X=d(A),I=r(A,"LI",{});var ke=s(I);ne=i(ke,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=r(ke,"CODE",{});var Te=s(Q);_e=i(Te,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Te.forEach(o),ke.forEach(o),A.forEach(o)},m(m,x){h(m,p,x),e(p,R),h(m,g,x),h(m,_,x),e(_,$),e($,k),e(_,f),e(_,M),e(M,me),h(m,K,x),h(m,E,x),e(E,Z),e(E,O),e(O,oe),e(E,he),e(E,S),e(S,fe),e(E,le),h(m,J,x),h(m,L,x),e(L,te),h(m,G,x),h(m,z,x),e(z,q),e(q,re),e(q,B),e(B,de),e(q,se),e(q,W),e(W,ue),e(z,ce),e(z,j),e(j,ge),e(j,U),e(U,ae),e(j,ie),e(j,H),e(H,pe),e(z,X),e(z,I),e(I,ne),e(I,Q),e(Q,_e)},d(m){m&&o(p),m&&o(g),m&&o(_),m&&o(K),m&&o(E),m&&o(J),m&&o(L),m&&o(G),m&&o(z)}}}function vx(P){let p,R,g,_,$;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=a("Module"),$=a(`
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){p=r(k,"P",{});var f=s(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(f,"CODE",{});var M=s(g);_=i(M,"Module"),M.forEach(o),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(k,f){h(k,p,f),e(p,R),e(p,g),e(g,_),e(p,$)},d(k){k&&o(p)}}}function yx(P){let p,R,g,_,$,k,f,M,me,K,E,Z,O,oe,he,S,fe,le,J,L,te,G,z,q,re,B,de,se,W,ue,ce,j,ge,U,ae,ie,H,pe,X,I,ne,Q,_e;return{c(){p=n("p"),R=a("TF 2.0 models accepts two formats as inputs:"),g=l(),_=n("ul"),$=n("li"),k=a("having all inputs as keyword arguments (like PyTorch models), or"),f=l(),M=n("li"),me=a("having all inputs as a list, tuple or dict in the first positional arguments."),K=l(),E=n("p"),Z=a("This second option is useful when using "),O=n("code"),oe=a("tf.keras.Model.fit"),he=a(` method which currently requires having all the
tensors in the first argument of the model call function: `),S=n("code"),fe=a("model(inputs)"),le=a("."),J=l(),L=n("p"),te=a(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),G=l(),z=n("ul"),q=n("li"),re=a("a single Tensor with "),B=n("code"),de=a("input_ids"),se=a(" only and nothing else: "),W=n("code"),ue=a("model(inputs_ids)"),ce=l(),j=n("li"),ge=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),U=n("code"),ae=a("model([input_ids, attention_mask])"),ie=a(" or "),H=n("code"),pe=a("model([input_ids, attention_mask, token_type_ids])"),X=l(),I=n("li"),ne=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=n("code"),_e=a('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(m){p=r(m,"P",{});var x=s(p);R=i(x,"TF 2.0 models accepts two formats as inputs:"),x.forEach(o),g=d(m),_=r(m,"UL",{});var Y=s(_);$=r(Y,"LI",{});var $e=s($);k=i($e,"having all inputs as keyword arguments (like PyTorch models), or"),$e.forEach(o),f=d(Y),M=r(Y,"LI",{});var Fe=s(M);me=i(Fe,"having all inputs as a list, tuple or dict in the first positional arguments."),Fe.forEach(o),Y.forEach(o),K=d(m),E=r(m,"P",{});var C=s(E);Z=i(C,"This second option is useful when using "),O=r(C,"CODE",{});var we=s(O);oe=i(we,"tf.keras.Model.fit"),we.forEach(o),he=i(C,` method which currently requires having all the
tensors in the first argument of the model call function: `),S=r(C,"CODE",{});var ye=s(S);fe=i(ye,"model(inputs)"),ye.forEach(o),le=i(C,"."),C.forEach(o),J=d(m),L=r(m,"P",{});var Ee=s(L);te=i(Ee,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Ee.forEach(o),G=d(m),z=r(m,"UL",{});var A=s(z);q=r(A,"LI",{});var V=s(q);re=i(V,"a single Tensor with "),B=r(V,"CODE",{});var Re=s(B);de=i(Re,"input_ids"),Re.forEach(o),se=i(V," only and nothing else: "),W=r(V,"CODE",{});var ee=s(W);ue=i(ee,"model(inputs_ids)"),ee.forEach(o),V.forEach(o),ce=d(A),j=r(A,"LI",{});var D=s(j);ge=i(D,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),U=r(D,"CODE",{});var ze=s(U);ae=i(ze,"model([input_ids, attention_mask])"),ze.forEach(o),ie=i(D," or "),H=r(D,"CODE",{});var ve=s(H);pe=i(ve,"model([input_ids, attention_mask, token_type_ids])"),ve.forEach(o),D.forEach(o),X=d(A),I=r(A,"LI",{});var ke=s(I);ne=i(ke,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=r(ke,"CODE",{});var Te=s(Q);_e=i(Te,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Te.forEach(o),ke.forEach(o),A.forEach(o)},m(m,x){h(m,p,x),e(p,R),h(m,g,x),h(m,_,x),e(_,$),e($,k),e(_,f),e(_,M),e(M,me),h(m,K,x),h(m,E,x),e(E,Z),e(E,O),e(O,oe),e(E,he),e(E,S),e(S,fe),e(E,le),h(m,J,x),h(m,L,x),e(L,te),h(m,G,x),h(m,z,x),e(z,q),e(q,re),e(q,B),e(B,de),e(q,se),e(q,W),e(W,ue),e(z,ce),e(z,j),e(j,ge),e(j,U),e(U,ae),e(j,ie),e(j,H),e(H,pe),e(z,X),e(z,I),e(I,ne),e(I,Q),e(Q,_e)},d(m){m&&o(p),m&&o(g),m&&o(_),m&&o(K),m&&o(E),m&&o(J),m&&o(L),m&&o(G),m&&o(z)}}}function Tx(P){let p,R,g,_,$,k,f,M,me,K,E,Z,O,oe,he,S,fe,le,J,L,te,G,z,q,re,B,de,se,W,ue,ce,j,ge,U,ae,ie,H,pe,X,I,ne,Q,_e;return{c(){p=n("p"),R=a("TF 2.0 models accepts two formats as inputs:"),g=l(),_=n("ul"),$=n("li"),k=a("having all inputs as keyword arguments (like PyTorch models), or"),f=l(),M=n("li"),me=a("having all inputs as a list, tuple or dict in the first positional arguments."),K=l(),E=n("p"),Z=a("This second option is useful when using "),O=n("code"),oe=a("tf.keras.Model.fit"),he=a(` method which currently requires having all the
tensors in the first argument of the model call function: `),S=n("code"),fe=a("model(inputs)"),le=a("."),J=l(),L=n("p"),te=a(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),G=l(),z=n("ul"),q=n("li"),re=a("a single Tensor with "),B=n("code"),de=a("input_ids"),se=a(" only and nothing else: "),W=n("code"),ue=a("model(inputs_ids)"),ce=l(),j=n("li"),ge=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),U=n("code"),ae=a("model([input_ids, attention_mask])"),ie=a(" or "),H=n("code"),pe=a("model([input_ids, attention_mask, token_type_ids])"),X=l(),I=n("li"),ne=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=n("code"),_e=a('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(m){p=r(m,"P",{});var x=s(p);R=i(x,"TF 2.0 models accepts two formats as inputs:"),x.forEach(o),g=d(m),_=r(m,"UL",{});var Y=s(_);$=r(Y,"LI",{});var $e=s($);k=i($e,"having all inputs as keyword arguments (like PyTorch models), or"),$e.forEach(o),f=d(Y),M=r(Y,"LI",{});var Fe=s(M);me=i(Fe,"having all inputs as a list, tuple or dict in the first positional arguments."),Fe.forEach(o),Y.forEach(o),K=d(m),E=r(m,"P",{});var C=s(E);Z=i(C,"This second option is useful when using "),O=r(C,"CODE",{});var we=s(O);oe=i(we,"tf.keras.Model.fit"),we.forEach(o),he=i(C,` method which currently requires having all the
tensors in the first argument of the model call function: `),S=r(C,"CODE",{});var ye=s(S);fe=i(ye,"model(inputs)"),ye.forEach(o),le=i(C,"."),C.forEach(o),J=d(m),L=r(m,"P",{});var Ee=s(L);te=i(Ee,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Ee.forEach(o),G=d(m),z=r(m,"UL",{});var A=s(z);q=r(A,"LI",{});var V=s(q);re=i(V,"a single Tensor with "),B=r(V,"CODE",{});var Re=s(B);de=i(Re,"input_ids"),Re.forEach(o),se=i(V," only and nothing else: "),W=r(V,"CODE",{});var ee=s(W);ue=i(ee,"model(inputs_ids)"),ee.forEach(o),V.forEach(o),ce=d(A),j=r(A,"LI",{});var D=s(j);ge=i(D,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),U=r(D,"CODE",{});var ze=s(U);ae=i(ze,"model([input_ids, attention_mask])"),ze.forEach(o),ie=i(D," or "),H=r(D,"CODE",{});var ve=s(H);pe=i(ve,"model([input_ids, attention_mask, token_type_ids])"),ve.forEach(o),D.forEach(o),X=d(A),I=r(A,"LI",{});var ke=s(I);ne=i(ke,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=r(ke,"CODE",{});var Te=s(Q);_e=i(Te,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Te.forEach(o),ke.forEach(o),A.forEach(o)},m(m,x){h(m,p,x),e(p,R),h(m,g,x),h(m,_,x),e(_,$),e($,k),e(_,f),e(_,M),e(M,me),h(m,K,x),h(m,E,x),e(E,Z),e(E,O),e(O,oe),e(E,he),e(E,S),e(S,fe),e(E,le),h(m,J,x),h(m,L,x),e(L,te),h(m,G,x),h(m,z,x),e(z,q),e(q,re),e(q,B),e(B,de),e(q,se),e(q,W),e(W,ue),e(z,ce),e(z,j),e(j,ge),e(j,U),e(U,ae),e(j,ie),e(j,H),e(H,pe),e(z,X),e(z,I),e(I,ne),e(I,Q),e(Q,_e)},d(m){m&&o(p),m&&o(g),m&&o(_),m&&o(K),m&&o(E),m&&o(J),m&&o(L),m&&o(G),m&&o(z)}}}function wx(P){let p,R,g,_,$;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=a("Module"),$=a(`
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){p=r(k,"P",{});var f=s(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(f,"CODE",{});var M=s(g);_=i(M,"Module"),M.forEach(o),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(k,f){h(k,p,f),e(p,R),e(p,g),e(g,_),e(p,$)},d(k){k&&o(p)}}}function bx(P){let p,R,g,_,$,k,f,M,me,K,E,Z,O,oe,he,S,fe,le,J,L,te,G,z,q,re,B,de,se,W,ue,ce,j,ge,U,ae,ie,H,pe,X,I,ne,Q,_e;return{c(){p=n("p"),R=a("TF 2.0 models accepts two formats as inputs:"),g=l(),_=n("ul"),$=n("li"),k=a("having all inputs as keyword arguments (like PyTorch models), or"),f=l(),M=n("li"),me=a("having all inputs as a list, tuple or dict in the first positional arguments."),K=l(),E=n("p"),Z=a("This second option is useful when using "),O=n("code"),oe=a("tf.keras.Model.fit"),he=a(` method which currently requires having all the
tensors in the first argument of the model call function: `),S=n("code"),fe=a("model(inputs)"),le=a("."),J=l(),L=n("p"),te=a(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),G=l(),z=n("ul"),q=n("li"),re=a("a single Tensor with "),B=n("code"),de=a("input_ids"),se=a(" only and nothing else: "),W=n("code"),ue=a("model(inputs_ids)"),ce=l(),j=n("li"),ge=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),U=n("code"),ae=a("model([input_ids, attention_mask])"),ie=a(" or "),H=n("code"),pe=a("model([input_ids, attention_mask, token_type_ids])"),X=l(),I=n("li"),ne=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=n("code"),_e=a('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(m){p=r(m,"P",{});var x=s(p);R=i(x,"TF 2.0 models accepts two formats as inputs:"),x.forEach(o),g=d(m),_=r(m,"UL",{});var Y=s(_);$=r(Y,"LI",{});var $e=s($);k=i($e,"having all inputs as keyword arguments (like PyTorch models), or"),$e.forEach(o),f=d(Y),M=r(Y,"LI",{});var Fe=s(M);me=i(Fe,"having all inputs as a list, tuple or dict in the first positional arguments."),Fe.forEach(o),Y.forEach(o),K=d(m),E=r(m,"P",{});var C=s(E);Z=i(C,"This second option is useful when using "),O=r(C,"CODE",{});var we=s(O);oe=i(we,"tf.keras.Model.fit"),we.forEach(o),he=i(C,` method which currently requires having all the
tensors in the first argument of the model call function: `),S=r(C,"CODE",{});var ye=s(S);fe=i(ye,"model(inputs)"),ye.forEach(o),le=i(C,"."),C.forEach(o),J=d(m),L=r(m,"P",{});var Ee=s(L);te=i(Ee,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Ee.forEach(o),G=d(m),z=r(m,"UL",{});var A=s(z);q=r(A,"LI",{});var V=s(q);re=i(V,"a single Tensor with "),B=r(V,"CODE",{});var Re=s(B);de=i(Re,"input_ids"),Re.forEach(o),se=i(V," only and nothing else: "),W=r(V,"CODE",{});var ee=s(W);ue=i(ee,"model(inputs_ids)"),ee.forEach(o),V.forEach(o),ce=d(A),j=r(A,"LI",{});var D=s(j);ge=i(D,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),U=r(D,"CODE",{});var ze=s(U);ae=i(ze,"model([input_ids, attention_mask])"),ze.forEach(o),ie=i(D," or "),H=r(D,"CODE",{});var ve=s(H);pe=i(ve,"model([input_ids, attention_mask, token_type_ids])"),ve.forEach(o),D.forEach(o),X=d(A),I=r(A,"LI",{});var ke=s(I);ne=i(ke,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=r(ke,"CODE",{});var Te=s(Q);_e=i(Te,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Te.forEach(o),ke.forEach(o),A.forEach(o)},m(m,x){h(m,p,x),e(p,R),h(m,g,x),h(m,_,x),e(_,$),e($,k),e(_,f),e(_,M),e(M,me),h(m,K,x),h(m,E,x),e(E,Z),e(E,O),e(O,oe),e(E,he),e(E,S),e(S,fe),e(E,le),h(m,J,x),h(m,L,x),e(L,te),h(m,G,x),h(m,z,x),e(z,q),e(q,re),e(q,B),e(B,de),e(q,se),e(q,W),e(W,ue),e(z,ce),e(z,j),e(j,ge),e(j,U),e(U,ae),e(j,ie),e(j,H),e(H,pe),e(z,X),e(z,I),e(I,ne),e(I,Q),e(Q,_e)},d(m){m&&o(p),m&&o(g),m&&o(_),m&&o(K),m&&o(E),m&&o(J),m&&o(L),m&&o(G),m&&o(z)}}}function $x(P){let p,R,g,_,$;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=a("Module"),$=a(`
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){p=r(k,"P",{});var f=s(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(f,"CODE",{});var M=s(g);_=i(M,"Module"),M.forEach(o),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(k,f){h(k,p,f),e(p,R),e(p,g),e(g,_),e(p,$)},d(k){k&&o(p)}}}function Rx(P){let p,R,g,_,$,k,f,M,me,K,E,Z,O,oe,he,S,fe,le,J,L,te,G,z,q,re,B,de,se,W,ue,ce,j,ge,U,ae,ie,H,pe,X,I,ne,Q,_e;return{c(){p=n("p"),R=a("TF 2.0 models accepts two formats as inputs:"),g=l(),_=n("ul"),$=n("li"),k=a("having all inputs as keyword arguments (like PyTorch models), or"),f=l(),M=n("li"),me=a("having all inputs as a list, tuple or dict in the first positional arguments."),K=l(),E=n("p"),Z=a("This second option is useful when using "),O=n("code"),oe=a("tf.keras.Model.fit"),he=a(` method which currently requires having all the
tensors in the first argument of the model call function: `),S=n("code"),fe=a("model(inputs)"),le=a("."),J=l(),L=n("p"),te=a(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),G=l(),z=n("ul"),q=n("li"),re=a("a single Tensor with "),B=n("code"),de=a("input_ids"),se=a(" only and nothing else: "),W=n("code"),ue=a("model(inputs_ids)"),ce=l(),j=n("li"),ge=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),U=n("code"),ae=a("model([input_ids, attention_mask])"),ie=a(" or "),H=n("code"),pe=a("model([input_ids, attention_mask, token_type_ids])"),X=l(),I=n("li"),ne=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=n("code"),_e=a('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(m){p=r(m,"P",{});var x=s(p);R=i(x,"TF 2.0 models accepts two formats as inputs:"),x.forEach(o),g=d(m),_=r(m,"UL",{});var Y=s(_);$=r(Y,"LI",{});var $e=s($);k=i($e,"having all inputs as keyword arguments (like PyTorch models), or"),$e.forEach(o),f=d(Y),M=r(Y,"LI",{});var Fe=s(M);me=i(Fe,"having all inputs as a list, tuple or dict in the first positional arguments."),Fe.forEach(o),Y.forEach(o),K=d(m),E=r(m,"P",{});var C=s(E);Z=i(C,"This second option is useful when using "),O=r(C,"CODE",{});var we=s(O);oe=i(we,"tf.keras.Model.fit"),we.forEach(o),he=i(C,` method which currently requires having all the
tensors in the first argument of the model call function: `),S=r(C,"CODE",{});var ye=s(S);fe=i(ye,"model(inputs)"),ye.forEach(o),le=i(C,"."),C.forEach(o),J=d(m),L=r(m,"P",{});var Ee=s(L);te=i(Ee,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Ee.forEach(o),G=d(m),z=r(m,"UL",{});var A=s(z);q=r(A,"LI",{});var V=s(q);re=i(V,"a single Tensor with "),B=r(V,"CODE",{});var Re=s(B);de=i(Re,"input_ids"),Re.forEach(o),se=i(V," only and nothing else: "),W=r(V,"CODE",{});var ee=s(W);ue=i(ee,"model(inputs_ids)"),ee.forEach(o),V.forEach(o),ce=d(A),j=r(A,"LI",{});var D=s(j);ge=i(D,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),U=r(D,"CODE",{});var ze=s(U);ae=i(ze,"model([input_ids, attention_mask])"),ze.forEach(o),ie=i(D," or "),H=r(D,"CODE",{});var ve=s(H);pe=i(ve,"model([input_ids, attention_mask, token_type_ids])"),ve.forEach(o),D.forEach(o),X=d(A),I=r(A,"LI",{});var ke=s(I);ne=i(ke,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=r(ke,"CODE",{});var Te=s(Q);_e=i(Te,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Te.forEach(o),ke.forEach(o),A.forEach(o)},m(m,x){h(m,p,x),e(p,R),h(m,g,x),h(m,_,x),e(_,$),e($,k),e(_,f),e(_,M),e(M,me),h(m,K,x),h(m,E,x),e(E,Z),e(E,O),e(O,oe),e(E,he),e(E,S),e(S,fe),e(E,le),h(m,J,x),h(m,L,x),e(L,te),h(m,G,x),h(m,z,x),e(z,q),e(q,re),e(q,B),e(B,de),e(q,se),e(q,W),e(W,ue),e(z,ce),e(z,j),e(j,ge),e(j,U),e(U,ae),e(j,ie),e(j,H),e(H,pe),e(z,X),e(z,I),e(I,ne),e(I,Q),e(Q,_e)},d(m){m&&o(p),m&&o(g),m&&o(_),m&&o(K),m&&o(E),m&&o(J),m&&o(L),m&&o(G),m&&o(z)}}}function Mx(P){let p,R,g,_,$;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=a("Module"),$=a(`
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){p=r(k,"P",{});var f=s(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(f,"CODE",{});var M=s(g);_=i(M,"Module"),M.forEach(o),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(k,f){h(k,p,f),e(p,R),e(p,g),e(g,_),e(p,$)},d(k){k&&o(p)}}}function xx(P){let p,R,g,_,$,k,f,M,me,K,E,Z,O,oe,he,S,fe,le,J,L,te,G,z,q,re,B,de,se,W,ue,ce,j,ge,U,ae,ie,H,pe,X,I,ne,Q,_e;return{c(){p=n("p"),R=a("TF 2.0 models accepts two formats as inputs:"),g=l(),_=n("ul"),$=n("li"),k=a("having all inputs as keyword arguments (like PyTorch models), or"),f=l(),M=n("li"),me=a("having all inputs as a list, tuple or dict in the first positional arguments."),K=l(),E=n("p"),Z=a("This second option is useful when using "),O=n("code"),oe=a("tf.keras.Model.fit"),he=a(` method which currently requires having all the
tensors in the first argument of the model call function: `),S=n("code"),fe=a("model(inputs)"),le=a("."),J=l(),L=n("p"),te=a(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),G=l(),z=n("ul"),q=n("li"),re=a("a single Tensor with "),B=n("code"),de=a("input_ids"),se=a(" only and nothing else: "),W=n("code"),ue=a("model(inputs_ids)"),ce=l(),j=n("li"),ge=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),U=n("code"),ae=a("model([input_ids, attention_mask])"),ie=a(" or "),H=n("code"),pe=a("model([input_ids, attention_mask, token_type_ids])"),X=l(),I=n("li"),ne=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=n("code"),_e=a('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(m){p=r(m,"P",{});var x=s(p);R=i(x,"TF 2.0 models accepts two formats as inputs:"),x.forEach(o),g=d(m),_=r(m,"UL",{});var Y=s(_);$=r(Y,"LI",{});var $e=s($);k=i($e,"having all inputs as keyword arguments (like PyTorch models), or"),$e.forEach(o),f=d(Y),M=r(Y,"LI",{});var Fe=s(M);me=i(Fe,"having all inputs as a list, tuple or dict in the first positional arguments."),Fe.forEach(o),Y.forEach(o),K=d(m),E=r(m,"P",{});var C=s(E);Z=i(C,"This second option is useful when using "),O=r(C,"CODE",{});var we=s(O);oe=i(we,"tf.keras.Model.fit"),we.forEach(o),he=i(C,` method which currently requires having all the
tensors in the first argument of the model call function: `),S=r(C,"CODE",{});var ye=s(S);fe=i(ye,"model(inputs)"),ye.forEach(o),le=i(C,"."),C.forEach(o),J=d(m),L=r(m,"P",{});var Ee=s(L);te=i(Ee,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),Ee.forEach(o),G=d(m),z=r(m,"UL",{});var A=s(z);q=r(A,"LI",{});var V=s(q);re=i(V,"a single Tensor with "),B=r(V,"CODE",{});var Re=s(B);de=i(Re,"input_ids"),Re.forEach(o),se=i(V," only and nothing else: "),W=r(V,"CODE",{});var ee=s(W);ue=i(ee,"model(inputs_ids)"),ee.forEach(o),V.forEach(o),ce=d(A),j=r(A,"LI",{});var D=s(j);ge=i(D,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),U=r(D,"CODE",{});var ze=s(U);ae=i(ze,"model([input_ids, attention_mask])"),ze.forEach(o),ie=i(D," or "),H=r(D,"CODE",{});var ve=s(H);pe=i(ve,"model([input_ids, attention_mask, token_type_ids])"),ve.forEach(o),D.forEach(o),X=d(A),I=r(A,"LI",{});var ke=s(I);ne=i(ke,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=r(ke,"CODE",{});var Te=s(Q);_e=i(Te,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Te.forEach(o),ke.forEach(o),A.forEach(o)},m(m,x){h(m,p,x),e(p,R),h(m,g,x),h(m,_,x),e(_,$),e($,k),e(_,f),e(_,M),e(M,me),h(m,K,x),h(m,E,x),e(E,Z),e(E,O),e(O,oe),e(E,he),e(E,S),e(S,fe),e(E,le),h(m,J,x),h(m,L,x),e(L,te),h(m,G,x),h(m,z,x),e(z,q),e(q,re),e(q,B),e(B,de),e(q,se),e(q,W),e(W,ue),e(z,ce),e(z,j),e(j,ge),e(j,U),e(U,ae),e(j,ie),e(j,H),e(H,pe),e(z,X),e(z,I),e(I,ne),e(I,Q),e(Q,_e)},d(m){m&&o(p),m&&o(g),m&&o(_),m&&o(K),m&&o(E),m&&o(J),m&&o(L),m&&o(G),m&&o(z)}}}function Ex(P){let p,R,g,_,$;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=a("Module"),$=a(`
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){p=r(k,"P",{});var f=s(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(f,"CODE",{});var M=s(g);_=i(M,"Module"),M.forEach(o),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(k,f){h(k,p,f),e(p,R),e(p,g),e(g,_),e(p,$)},d(k){k&&o(p)}}}function zx(P){let p,R,g,_,$;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=a("Module"),$=a(`
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){p=r(k,"P",{});var f=s(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(f,"CODE",{});var M=s(g);_=i(M,"Module"),M.forEach(o),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(k,f){h(k,p,f),e(p,R),e(p,g),e(g,_),e(p,$)},d(k){k&&o(p)}}}function jx(P){let p,R,g,_,$;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=a("Module"),$=a(`
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){p=r(k,"P",{});var f=s(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(f,"CODE",{});var M=s(g);_=i(M,"Module"),M.forEach(o),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(k,f){h(k,p,f),e(p,R),e(p,g),e(g,_),e(p,$)},d(k){k&&o(p)}}}function qx(P){let p,R,g,_,$;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=a("Module"),$=a(`
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){p=r(k,"P",{});var f=s(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(f,"CODE",{});var M=s(g);_=i(M,"Module"),M.forEach(o),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(k,f){h(k,p,f),e(p,R),e(p,g),e(g,_),e(p,$)},d(k){k&&o(p)}}}function Cx(P){let p,R,g,_,$;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=a("Module"),$=a(`
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){p=r(k,"P",{});var f=s(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(f,"CODE",{});var M=s(g);_=i(M,"Module"),M.forEach(o),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(k,f){h(k,p,f),e(p,R),e(p,g),e(g,_),e(p,$)},d(k){k&&o(p)}}}function Px(P){let p,R,g,_,$;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=a("Module"),$=a(`
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){p=r(k,"P",{});var f=s(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(f,"CODE",{});var M=s(g);_=i(M,"Module"),M.forEach(o),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(k,f){h(k,p,f),e(p,R),e(p,g),e(g,_),e(p,$)},d(k){k&&o(p)}}}function Ax(P){let p,R,g,_,$;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=a("Module"),$=a(`
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){p=r(k,"P",{});var f=s(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(f,"CODE",{});var M=s(g);_=i(M,"Module"),M.forEach(o),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(k,f){h(k,p,f),e(p,R),e(p,g),e(g,_),e(p,$)},d(k){k&&o(p)}}}function Lx(P){let p,R,g,_,$,k,f,M,me,K,E,Z,O,oe,he,S,fe,le,J,L,te,G,z,q,re,B,de,se,W,ue,ce,j,ge,U,ae,ie,H,pe,X,I,ne,Q,_e,m,x,Y,$e,Fe,C,we,ye,Ee,A,V,Re,ee,D,ze,ve,ke,Te,qf,Cf,vr,Pf,Af,Lf,ut,If,Hi,Df,Nf,Qi,Of,Sf,Wf,rd,Uf,Bf,yr,Em,gt,mn,sd,Tr,Hf,ad,Qf,zm,je,wr,Vf,br,Jf,$r,Kf,Gf,Xf,Rr,Yf,Vi,Zf,eu,ou,id,tu,nu,Mr,ru,Jo,xr,su,ld,au,iu,Er,Ji,lu,dd,du,cu,Ki,pu,cd,mu,hu,hn,zr,fu,jr,uu,pd,gu,_u,ku,zo,qr,Fu,md,vu,yu,Cr,Tu,_t,wu,hd,bu,$u,fd,Ru,Mu,xu,Gi,Pr,jm,kt,fn,ud,Ar,Eu,gd,zu,qm,qe,Lr,ju,Ir,qu,_d,Cu,Pu,Au,un,Xi,Lu,Iu,Yi,Du,Nu,Ou,Dr,Su,Zi,Wu,Uu,Bu,kd,Hu,Qu,Nr,Vu,Ko,Or,Ju,Fd,Ku,Gu,Sr,el,Xu,vd,Yu,Zu,ol,eg,yd,og,Cm,Ft,gn,Td,Wr,tg,wd,ng,Pm,Ke,Ur,rg,Br,sg,Hr,ag,ig,lg,Qr,dg,Vr,cg,pg,mg,Se,hg,bd,fg,ug,$d,gg,_g,Rd,kg,Fg,Md,vg,yg,xd,Tg,wg,Ed,bg,$g,Rg,Xe,Jr,Mg,vt,xg,tl,Eg,zg,zd,jg,qg,Cg,_n,Pg,jd,Ag,Lg,Kr,Am,yt,kn,qd,Gr,Ig,Cd,Dg,Lm,Oo,Xr,Ng,Tt,Og,Pd,Sg,Wg,Yr,Ug,Bg,Hg,Ye,Zr,Qg,wt,Vg,nl,Jg,Kg,Ad,Gg,Xg,Yg,Fn,Zg,Ld,e_,o_,es,Im,bt,vn,Id,os,t_,Dd,n_,Dm,So,ts,r_,$t,s_,Nd,a_,i_,ns,l_,d_,c_,Ze,rs,p_,Rt,m_,rl,h_,f_,Od,u_,g_,__,yn,k_,Sd,F_,v_,ss,Nm,Mt,Tn,Wd,as,y_,Ud,T_,Om,$o,is,w_,Bd,b_,$_,ls,R_,ds,M_,x_,E_,Ne,cs,z_,xt,j_,sl,q_,C_,Hd,P_,A_,L_,wn,I_,Qd,D_,N_,ps,O_,Vd,S_,W_,ms,Sm,Et,bn,Jd,hs,U_,Kd,B_,Wm,Ro,fs,H_,Gd,Q_,V_,us,J_,gs,K_,G_,X_,eo,_s,Y_,zt,Z_,al,ek,ok,Xd,tk,nk,rk,$n,sk,Yd,ak,ik,ks,Um,jt,Rn,Zd,Fs,lk,ec,dk,Bm,Mo,vs,ck,oc,pk,mk,ys,hk,Ts,fk,uk,gk,oo,ws,_k,qt,kk,il,Fk,vk,tc,yk,Tk,wk,Mn,bk,nc,$k,Rk,bs,Hm,Ct,xn,rc,$s,Mk,sc,xk,Qm,xo,Rs,Ek,Pt,zk,ac,jk,qk,ic,Ck,Pk,Ak,Ms,Lk,xs,Ik,Dk,Nk,to,Es,Ok,At,Sk,ll,Wk,Uk,lc,Bk,Hk,Qk,En,Vk,dc,Jk,Kk,zs,Vm,Lt,zn,cc,js,Gk,pc,Xk,Jm,We,qs,Yk,mc,Zk,eF,Cs,oF,dl,tF,nF,rF,Ps,sF,As,aF,iF,lF,jn,dF,no,Ls,cF,It,pF,cl,mF,hF,hc,fF,uF,gF,qn,_F,fc,kF,FF,Is,Km,Dt,Cn,uc,Ds,vF,gc,yF,Gm,Ue,Ns,TF,Os,wF,_c,bF,$F,RF,Ss,MF,pl,xF,EF,zF,Ws,jF,Us,qF,CF,PF,Pn,AF,ro,Bs,LF,Nt,IF,ml,DF,NF,kc,OF,SF,WF,An,UF,Fc,BF,HF,Hs,Xm,Ot,Ln,vc,Qs,QF,yc,VF,Ym,Be,Vs,JF,Js,KF,Tc,GF,XF,YF,Ks,ZF,hl,ev,ov,tv,Gs,nv,Xs,rv,sv,av,In,iv,jo,Ys,lv,Ge,dv,wc,cv,pv,bc,mv,hv,$c,fv,uv,Rc,gv,_v,Mc,kv,Fv,vv,xc,yv,Tv,Zs,Zm,St,Dn,Ec,ea,wv,zc,bv,eh,He,oa,$v,jc,Rv,Mv,ta,xv,fl,Ev,zv,jv,na,qv,ra,Cv,Pv,Av,Nn,Lv,so,sa,Iv,Wt,Dv,ul,Nv,Ov,qc,Sv,Wv,Uv,On,Bv,Cc,Hv,Qv,aa,oh,Ut,Sn,Pc,ia,Vv,Ac,Jv,th,Qe,la,Kv,Lc,Gv,Xv,da,Yv,gl,Zv,ey,oy,ca,ty,pa,ny,ry,sy,Wn,ay,ao,ma,iy,Bt,ly,_l,dy,cy,Ic,py,my,hy,Un,fy,Dc,uy,gy,ha,nh,Ht,Bn,Nc,fa,_y,Oc,ky,rh,Ve,ua,Fy,Sc,vy,yy,ga,Ty,kl,wy,by,$y,_a,Ry,ka,My,xy,Ey,Hn,zy,io,Fa,jy,Qt,qy,Fl,Cy,Py,Wc,Ay,Ly,Iy,Qn,Dy,Uc,Ny,Oy,va,sh,Vt,Vn,Bc,ya,Sy,Hc,Wy,ah,Je,Ta,Uy,Jt,By,Qc,Hy,Qy,Vc,Vy,Jy,Ky,wa,Gy,vl,Xy,Yy,Zy,ba,eT,$a,oT,tT,nT,Jn,rT,lo,Ra,sT,Kt,aT,yl,iT,lT,Jc,dT,cT,pT,Kn,mT,Kc,hT,fT,Ma,ih,Gt,Gn,Gc,xa,uT,Xc,gT,lh,Ce,Ea,_T,Yc,kT,FT,za,vT,Tl,yT,TT,wT,ja,bT,qa,$T,RT,MT,Zc,xT,ET,Wo,ep,Ca,zT,jT,op,Pa,qT,CT,tp,Aa,PT,AT,np,La,LT,IT,co,Ia,DT,Xt,NT,rp,OT,ST,sp,WT,UT,BT,Xn,HT,ap,QT,VT,Da,dh,Yt,Yn,ip,Na,JT,lp,KT,ch,Pe,Oa,GT,Sa,XT,dp,YT,ZT,e1,Wa,o1,wl,t1,n1,r1,Ua,s1,Ba,a1,i1,l1,cp,d1,c1,Uo,pp,Ha,p1,m1,mp,Qa,h1,f1,hp,Va,u1,g1,fp,Ja,_1,k1,po,Ka,F1,Zt,v1,up,y1,T1,gp,w1,b1,$1,Zn,R1,_p,M1,x1,Ga,ph,en,er,kp,Xa,E1,Fp,z1,mh,Ae,Ya,j1,vp,q1,C1,Za,P1,bl,A1,L1,I1,ei,D1,oi,N1,O1,S1,yp,W1,U1,Bo,Tp,ti,B1,H1,wp,ni,Q1,V1,bp,ri,J1,K1,$p,si,G1,X1,mo,ai,Y1,on,Z1,Rp,ew,ow,Mp,tw,nw,rw,or,sw,xp,aw,iw,ii,hh,tn,tr,Ep,li,lw,zp,dw,fh,Le,di,cw,jp,pw,mw,ci,hw,$l,fw,uw,gw,pi,_w,mi,kw,Fw,vw,qp,yw,Tw,Ho,Cp,hi,ww,bw,Pp,fi,$w,Rw,Ap,ui,Mw,xw,Lp,gi,Ew,zw,ho,_i,jw,nn,qw,Ip,Cw,Pw,Dp,Aw,Lw,Iw,nr,Dw,Np,Nw,Ow,ki,uh,rn,rr,Op,Fi,Sw,Sp,Ww,gh,Ie,vi,Uw,Wp,Bw,Hw,yi,Qw,Rl,Vw,Jw,Kw,Ti,Gw,wi,Xw,Yw,Zw,Up,eb,ob,Qo,Bp,bi,tb,nb,Hp,$i,rb,sb,Qp,Ri,ab,ib,Vp,Mi,lb,db,fo,xi,cb,sn,pb,Jp,mb,hb,Kp,fb,ub,gb,sr,_b,Gp,kb,Fb,Ei,_h,an,ar,Xp,zi,vb,Yp,yb,kh,De,ji,Tb,ln,wb,Zp,bb,$b,em,Rb,Mb,xb,qi,Eb,Ml,zb,jb,qb,Ci,Cb,Pi,Pb,Ab,Lb,om,Ib,Db,Vo,tm,Ai,Nb,Ob,nm,Li,Sb,Wb,rm,Ii,Ub,Bb,sm,Di,Hb,Qb,uo,Ni,Vb,dn,Jb,am,Kb,Gb,im,Xb,Yb,Zb,ir,e$,lm,o$,t$,Oi,Fh;return k=new xe({}),oe=new xe({}),ye=new xe({}),D=new N({props:{name:"class transformers.RoFormerConfig",anchor:"transformers.RoFormerConfig",parameters:[{name:"vocab_size",val:" = 50000"},{name:"embedding_size",val:" = None"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 1536"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"pad_token_id",val:" = 0"},{name:"rotary_value",val:" = False"},{name:"use_cache",val:" = True"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/configuration_roformer.py#L34",parametersDescription:[{anchor:"transformers.RoFormerConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50000) &#x2014;
Vocabulary size of the RoFormer 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/roformer#transformers.RoFormerModel">RoFormerModel</a> or <a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.TFRoFormerModel">TFRoFormerModel</a>.`,name:"vocab_size"},{anchor:"transformers.RoFormerConfig.embedding_size",description:`<strong>embedding_size</strong> (<code>int</code>, <em>optional</em>, defaults to None) &#x2014;
Dimensionality of the encoder layers and the pooler layer. Defaults to the <code>hidden_size</code> if not provided.`,name:"embedding_size"},{anchor:"transformers.RoFormerConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimension of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.RoFormerConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.RoFormerConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.RoFormerConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.RoFormerConfig.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.RoFormerConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.RoFormerConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.RoFormerConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 1536) &#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 1536).`,name:"max_position_embeddings"},{anchor:"transformers.RoFormerConfig.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/roformer#transformers.RoFormerModel">RoFormerModel</a> or <a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.TFRoFormerModel">TFRoFormerModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.RoFormerConfig.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.RoFormerConfig.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.RoFormerConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.RoFormerConfig.rotary_value",description:`<strong>rotary_value</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not apply rotary position embeddings on value layer.`,name:"rotary_value"}]}}),yr=new Me({props:{code:`from transformers import RoFormerModel, RoFormerConfig

# Initializing a RoFormer junnyu/roformer_chinese_base style configuration
configuration = RoFormerConfig()

# Initializing a model from the junnyu/roformer_chinese_base style configuration
model = RoFormerModel(configuration)

# Accessing the model configuration
configuration = model.config`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RoFormerModel, RoFormerConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a RoFormer junnyu/roformer_chinese_base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = RoFormerConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the junnyu/roformer_chinese_base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),Tr=new xe({}),wr=new N({props:{name:"class transformers.RoFormerTokenizer",anchor:"transformers.RoFormerTokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = True"},{name:"do_basic_tokenize",val:" = True"},{name:"never_split",val:" = None"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/tokenization_roformer.py#L61",parametersDescription:[{anchor:"transformers.RoFormerTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.RoFormerTokenizer.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.RoFormerTokenizer.do_basic_tokenize",description:`<strong>do_basic_tokenize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to do basic tokenization before WordPiece.`,name:"do_basic_tokenize"},{anchor:"transformers.RoFormerTokenizer.never_split",description:`<strong>never_split</strong> (<code>Iterable</code>, <em>optional</em>) &#x2014;
Collection of tokens which will never be split during tokenization. Only has an effect when
<code>do_basic_tokenize=True</code>`,name:"never_split"},{anchor:"transformers.RoFormerTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[UNK]&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.RoFormerTokenizer.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.RoFormerTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[PAD]&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.RoFormerTokenizer.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.RoFormerTokenizer.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.RoFormerTokenizer.tokenize_chinese_chars",description:`<strong>tokenize_chinese_chars</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to tokenize Chinese characters.</p>
<p>This should likely be deactivated for Japanese (see this
<a href="https://github.com/huggingface/transformers/issues/328" rel="nofollow">issue</a>).
strip_accents &#x2014; (<code>bool</code>, <em>optional</em>):
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original BERT).`,name:"tokenize_chinese_chars"}]}}),Mr=new Me({props:{code:`from transformers import RoFormerTokenizer

tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
tokenizer.tokenize("\u4ECA\u5929\u5929\u6C14\u975E\u5E38\u597D\u3002")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RoFormerTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.tokenize(<span class="hljs-string">&quot;\u4ECA\u5929\u5929\u6C14\u975E\u5E38\u597D\u3002&quot;</span>)
<span class="hljs-comment"># [&#x27;\u4ECA&#x27;, &#x27;\u5929&#x27;, &#x27;\u5929&#x27;, &#x27;\u6C14&#x27;, &#x27;\u975E\u5E38&#x27;, &#x27;\u597D&#x27;, &#x27;\u3002&#x27;]</span>`}}),xr=new N({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.RoFormerTokenizer.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/roformer/tokenization_roformer.py#L227",parametersDescription:[{anchor:"transformers.RoFormerTokenizer.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.RoFormerTokenizer.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>
`}}),zr=new N({props:{name:"get_special_tokens_mask",anchor:"transformers.RoFormerTokenizer.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/roformer/tokenization_roformer.py#L252",parametersDescription:[{anchor:"transformers.RoFormerTokenizer.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.RoFormerTokenizer.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.RoFormerTokenizer.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>
`}}),qr=new N({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.RoFormerTokenizer.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/roformer/tokenization_roformer.py#L280",parametersDescription:[{anchor:"transformers.RoFormerTokenizer.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.RoFormerTokenizer.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>
`}}),Cr=new Me({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 |`}}),Pr=new N({props:{name:"save_vocabulary",anchor:"transformers.RoFormerTokenizer.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/roformer/tokenization_roformer.py#L309"}}),Ar=new xe({}),Lr=new N({props:{name:"class transformers.RoFormerTokenizerFast",anchor:"transformers.RoFormerTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = True"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/tokenization_roformer_fast.py#L63"}}),Nr=new Me({props:{code:`from transformers import RoFormerTokenizerFast

tokenizer = RoFormerTokenizerFast.from_pretrained("junnyu/roformer_chinese_base")
tokenizer.tokenize("\u4ECA\u5929\u5929\u6C14\u975E\u5E38\u597D\u3002")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RoFormerTokenizerFast

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RoFormerTokenizerFast.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.tokenize(<span class="hljs-string">&quot;\u4ECA\u5929\u5929\u6C14\u975E\u5E38\u597D\u3002&quot;</span>)
<span class="hljs-comment"># [&#x27;\u4ECA&#x27;, &#x27;\u5929&#x27;, &#x27;\u5929&#x27;, &#x27;\u6C14&#x27;, &#x27;\u975E\u5E38&#x27;, &#x27;\u597D&#x27;, &#x27;\u3002&#x27;]</span>`}}),Or=new N({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.RoFormerTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/tokenization_roformer_fast.py#L139",parametersDescription:[{anchor:"transformers.RoFormerTokenizerFast.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.RoFormerTokenizerFast.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>
`}}),Wr=new xe({}),Ur=new N({props:{name:"class transformers.RoFormerModel",anchor:"transformers.RoFormerModel",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_roformer.py#L794",parametersDescription:[{anchor:"transformers.RoFormerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</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"}]}}),Jr=new N({props:{name:"forward",anchor:"transformers.RoFormerModel.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_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/roformer/modeling_roformer.py#L834",parametersDescription:[{anchor:"transformers.RoFormerModel.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/roformer#transformers.RoFormerTokenizer">RoFormerTokenizer</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.RoFormerModel.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.RoFormerModel.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.RoFormerModel.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.RoFormerModel.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.RoFormerModel.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.RoFormerModel.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.RoFormerModel.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.RoFormerModel.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.RoFormerModel.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.RoFormerModel.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.RoFormerModel.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/roformer#transformers.RoFormerConfig"
>RoFormerConfig</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>
`}}),_n=new be({props:{$$slots:{default:[cx]},$$scope:{ctx:P}}}),Kr=new Me({props:{code:`from transformers import RoFormerTokenizer, RoFormerModel
import torch

tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = RoFormerModel.from_pretrained("junnyu/roformer_chinese_base")

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerModel.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&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`}}),Gr=new xe({}),Xr=new N({props:{name:"class transformers.RoFormerForCausalLM",anchor:"transformers.RoFormerForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_roformer.py#L1062",parametersDescription:[{anchor:"transformers.RoFormerForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</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"}]}}),Zr=new N({props:{name:"forward",anchor:"transformers.RoFormerForCausalLM.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"head_mask",val:" = None"},{name:"cross_attn_head_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/roformer/modeling_roformer.py#L1084",parametersDescription:[{anchor:"transformers.RoFormerForCausalLM.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/roformer#transformers.RoFormerTokenizer">RoFormerTokenizer</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.RoFormerForCausalLM.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.RoFormerForCausalLM.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.RoFormerForCausalLM.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.RoFormerForCausalLM.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.RoFormerForCausalLM.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.RoFormerForCausalLM.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.RoFormerForCausalLM.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.RoFormerForCausalLM.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.RoFormerForCausalLM.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.RoFormerForCausalLM.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.RoFormerForCausalLM.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.RoFormerForCausalLM.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/roformer#transformers.RoFormerConfig"
>RoFormerConfig</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>
`}}),Fn=new be({props:{$$slots:{default:[px]},$$scope:{ctx:P}}}),es=new Me({props:{code:`from transformers import RoFormerTokenizer, RoFormerForCausalLM, RoFormerConfig
import torch

tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
config = RoFormerConfig.from_pretrained("junnyu/roformer_chinese_base")
config.is_decoder = True
model = RoFormerForCausalLM.from_pretrained("junnyu/roformer_chinese_base", config=config)

inputs = tokenizer("\u4ECA\u5929\u5929\u6C14\u975E\u5E38\u597D\u3002", 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> RoFormerTokenizer, RoFormerForCausalLM, RoFormerConfig
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config = RoFormerConfig.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&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 = RoFormerForCausalLM.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>, config=config)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;\u4ECA\u5929\u5929\u6C14\u975E\u5E38\u597D\u3002&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`}}),os=new xe({}),ts=new N({props:{name:"class transformers.RoFormerForMaskedLM",anchor:"transformers.RoFormerForMaskedLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_roformer.py#L961",parametersDescription:[{anchor:"transformers.RoFormerForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</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 N({props:{name:"forward",anchor:"transformers.RoFormerForMaskedLM.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_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/roformer/modeling_roformer.py#L983",parametersDescription:[{anchor:"transformers.RoFormerForMaskedLM.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/roformer#transformers.RoFormerTokenizer">RoFormerTokenizer</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.RoFormerForMaskedLM.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.RoFormerForMaskedLM.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.RoFormerForMaskedLM.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.RoFormerForMaskedLM.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.RoFormerForMaskedLM.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.RoFormerForMaskedLM.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.RoFormerForMaskedLM.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.RoFormerForMaskedLM.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/roformer#transformers.RoFormerConfig"
>RoFormerConfig</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>
`}}),yn=new be({props:{$$slots:{default:[mx]},$$scope:{ctx:P}}}),ss=new Me({props:{code:`from transformers import RoFormerTokenizer, RoFormerForMaskedLM
import torch

tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = RoFormerForMaskedLM.from_pretrained("junnyu/roformer_chinese_base")

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerForMaskedLM.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&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`}}),as=new xe({}),is=new N({props:{name:"class transformers.RoFormerForSequenceClassification",anchor:"transformers.RoFormerForSequenceClassification",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_roformer.py#L1235",parametersDescription:[{anchor:"transformers.RoFormerForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</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 N({props:{name:"forward",anchor:"transformers.RoFormerForSequenceClassification.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_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/roformer/modeling_roformer.py#L1245",parametersDescription:[{anchor:"transformers.RoFormerForSequenceClassification.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/roformer#transformers.RoFormerTokenizer">RoFormerTokenizer</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.RoFormerForSequenceClassification.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.RoFormerForSequenceClassification.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.RoFormerForSequenceClassification.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.RoFormerForSequenceClassification.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.RoFormerForSequenceClassification.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.RoFormerForSequenceClassification.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.RoFormerForSequenceClassification.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.RoFormerForSequenceClassification.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/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),wn=new be({props:{$$slots:{default:[hx]},$$scope:{ctx:P}}}),ps=new Me({props:{code:`import torch
from transformers import RoFormerTokenizer, RoFormerForSequenceClassification

torch.manual_seed(0)
tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = RoFormerForSequenceClassification.from_pretrained("junnyu/roformer_chinese_base", 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> RoFormerTokenizer, RoFormerForSequenceClassification

<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 = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&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)
`}}),ms=new Me({props:{code:`import torch
from transformers import RoFormerTokenizer, RoFormerForSequenceClassification

torch.manual_seed(0)
tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = RoFormerForSequenceClassification.from_pretrained("junnyu/roformer_chinese_base", 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> RoFormerTokenizer, RoFormerForSequenceClassification

<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 = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&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)
`}}),hs=new xe({}),fs=new N({props:{name:"class transformers.RoFormerForMultipleChoice",anchor:"transformers.RoFormerForMultipleChoice",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_roformer.py#L1327",parametersDescription:[{anchor:"transformers.RoFormerForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</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"}]}}),_s=new N({props:{name:"forward",anchor:"transformers.RoFormerForMultipleChoice.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_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/roformer/modeling_roformer.py#L1338",parametersDescription:[{anchor:"transformers.RoFormerForMultipleChoice.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/roformer#transformers.RoFormerTokenizer">RoFormerTokenizer</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.RoFormerForMultipleChoice.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.RoFormerForMultipleChoice.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.RoFormerForMultipleChoice.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.RoFormerForMultipleChoice.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.RoFormerForMultipleChoice.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.RoFormerForMultipleChoice.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.RoFormerForMultipleChoice.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.RoFormerForMultipleChoice.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/roformer#transformers.RoFormerConfig"
>RoFormerConfig</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>
`}}),$n=new be({props:{$$slots:{default:[fx]},$$scope:{ctx:P}}}),ks=new Me({props:{code:`from transformers import RoFormerTokenizer, RoFormerForMultipleChoice
import torch

tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = RoFormerForMultipleChoice.from_pretrained("junnyu/roformer_chinese_base")

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&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`}}),Fs=new xe({}),vs=new N({props:{name:"class transformers.RoFormerForTokenClassification",anchor:"transformers.RoFormerForTokenClassification",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_roformer.py#L1419",parametersDescription:[{anchor:"transformers.RoFormerForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</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"}]}}),ws=new N({props:{name:"forward",anchor:"transformers.RoFormerForTokenClassification.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_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/roformer/modeling_roformer.py#L1431",parametersDescription:[{anchor:"transformers.RoFormerForTokenClassification.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/roformer#transformers.RoFormerTokenizer">RoFormerTokenizer</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.RoFormerForTokenClassification.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.RoFormerForTokenClassification.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.RoFormerForTokenClassification.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.RoFormerForTokenClassification.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.RoFormerForTokenClassification.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.RoFormerForTokenClassification.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.RoFormerForTokenClassification.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.RoFormerForTokenClassification.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/roformer#transformers.RoFormerConfig"
>RoFormerConfig</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>
`}}),Mn=new be({props:{$$slots:{default:[ux]},$$scope:{ctx:P}}}),bs=new Me({props:{code:`from transformers import RoFormerTokenizer, RoFormerForTokenClassification
import torch

tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = RoFormerForTokenClassification.from_pretrained("junnyu/roformer_chinese_base")

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerForTokenClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&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`}}),$s=new xe({}),Rs=new N({props:{name:"class transformers.RoFormerForQuestionAnswering",anchor:"transformers.RoFormerForQuestionAnswering",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_roformer.py#L1496",parametersDescription:[{anchor:"transformers.RoFormerForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</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"}]}}),Es=new N({props:{name:"forward",anchor:"transformers.RoFormerForQuestionAnswering.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_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/roformer/modeling_roformer.py#L1509",parametersDescription:[{anchor:"transformers.RoFormerForQuestionAnswering.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/roformer#transformers.RoFormerTokenizer">RoFormerTokenizer</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.RoFormerForQuestionAnswering.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.RoFormerForQuestionAnswering.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.RoFormerForQuestionAnswering.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.RoFormerForQuestionAnswering.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.RoFormerForQuestionAnswering.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.RoFormerForQuestionAnswering.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.RoFormerForQuestionAnswering.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.RoFormerForQuestionAnswering.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.RoFormerForQuestionAnswering.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/roformer#transformers.RoFormerConfig"
>RoFormerConfig</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>
`}}),En=new be({props:{$$slots:{default:[gx]},$$scope:{ctx:P}}}),zs=new Me({props:{code:`from transformers import RoFormerTokenizer, RoFormerForQuestionAnswering
import torch

torch.manual_seed(0)
tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = RoFormerForQuestionAnswering.from_pretrained("junnyu/roformer_chinese_base")

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> RoFormerTokenizer, RoFormerForQuestionAnswering
<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 = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RoFormerForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&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)
`}}),js=new xe({}),qs=new N({props:{name:"class transformers.TFRoFormerModel",anchor:"transformers.TFRoFormerModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_tf_roformer.py#L808",parametersDescription:[{anchor:"transformers.TFRoFormerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</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"}]}}),jn=new be({props:{$$slots:{default:[_x]},$$scope:{ctx:P}}}),Ls=new N({props:{name:"call",anchor:"transformers.TFRoFormerModel.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:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"training",val:": typing.Optional[bool] = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_tf_roformer.py#L814",parametersDescription:[{anchor:"transformers.TFRoFormerModel.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/roformer#transformers.RoFormerTokenizer">RoFormerTokenizer</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.TFRoFormerModel.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.TFRoFormerModel.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.TFRoFormerModel.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.TFRoFormerModel.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.TFRoFormerModel.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.TFRoFormerModel.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.TFRoFormerModel.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.TFRoFormerModel.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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</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/roformer#transformers.RoFormerConfig"
>RoFormerConfig</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>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.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),qn=new be({props:{$$slots:{default:[kx]},$$scope:{ctx:P}}}),Is=new Me({props:{code:`from transformers import RoFormerTokenizer, TFRoFormerModel
import tensorflow as tf

tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = TFRoFormerModel.from_pretrained("junnyu/roformer_chinese_base")

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> RoFormerTokenizer, TFRoFormerModel
<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 = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerModel.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&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`}}),Ds=new xe({}),Ns=new N({props:{name:"class transformers.TFRoFormerForMaskedLM",anchor:"transformers.TFRoFormerForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_tf_roformer.py#L870",parametersDescription:[{anchor:"transformers.TFRoFormerForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</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 be({props:{$$slots:{default:[Fx]},$$scope:{ctx:P}}}),Bs=new N({props:{name:"call",anchor:"transformers.TFRoFormerForMaskedLM.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:"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/roformer/modeling_tf_roformer.py#L886",parametersDescription:[{anchor:"transformers.TFRoFormerForMaskedLM.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/roformer#transformers.RoFormerTokenizer">RoFormerTokenizer</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.TFRoFormerForMaskedLM.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.TFRoFormerForMaskedLM.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.TFRoFormerForMaskedLM.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.TFRoFormerForMaskedLM.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.TFRoFormerForMaskedLM.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.TFRoFormerForMaskedLM.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.TFRoFormerForMaskedLM.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.TFRoFormerForMaskedLM.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.TFRoFormerForMaskedLM.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/roformer#transformers.RoFormerConfig"
>RoFormerConfig</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>
`}}),An=new be({props:{$$slots:{default:[vx]},$$scope:{ctx:P}}}),Hs=new Me({props:{code:`from transformers import RoFormerTokenizer, TFRoFormerForMaskedLM
import tensorflow as tf

tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = TFRoFormerForMaskedLM.from_pretrained("junnyu/roformer_chinese_base")

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> RoFormerTokenizer, TFRoFormerForMaskedLM
<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 = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerForMaskedLM.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&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`}}),Qs=new xe({}),Vs=new N({props:{name:"class transformers.TFRoFormerForCausalLM",anchor:"transformers.TFRoFormerForCausalLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_tf_roformer.py#L968",parametersDescription:[{anchor:"transformers.TFRoFormerForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</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"}]}}),In=new be({props:{$$slots:{default:[yx]},$$scope:{ctx:P}}}),Ys=new N({props:{name:"call",anchor:"transformers.TFRoFormerForCausalLM.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:"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/roformer/modeling_tf_roformer.py#L981",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutput"
>transformers.modeling_tf_outputs.TFCausalLMOutput</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/roformer#transformers.RoFormerConfig"
>RoFormerConfig</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>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutput"
>transformers.modeling_tf_outputs.TFCausalLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Zs=new Me({props:{code:`from transformers import RoFormerTokenizer, TFRoFormerForCausalLM
import tensorflow as tf

tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = TFRoFormerForCausalLM.from_pretrained("junnyu/roformer_chinese_base")

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> RoFormerTokenizer, TFRoFormerForCausalLM
<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 = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerForCausalLM.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&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`}}),ea=new xe({}),oa=new N({props:{name:"class transformers.TFRoFormerForSequenceClassification",anchor:"transformers.TFRoFormerForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_tf_roformer.py#L1096",parametersDescription:[{anchor:"transformers.TFRoFormerForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</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"}]}}),Nn=new be({props:{$$slots:{default:[Tx]},$$scope:{ctx:P}}}),sa=new N({props:{name:"call",anchor:"transformers.TFRoFormerForSequenceClassification.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:"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/roformer/modeling_tf_roformer.py#L1105",parametersDescription:[{anchor:"transformers.TFRoFormerForSequenceClassification.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/roformer#transformers.RoFormerTokenizer">RoFormerTokenizer</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.TFRoFormerForSequenceClassification.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.TFRoFormerForSequenceClassification.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.TFRoFormerForSequenceClassification.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.TFRoFormerForSequenceClassification.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.TFRoFormerForSequenceClassification.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.TFRoFormerForSequenceClassification.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.TFRoFormerForSequenceClassification.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.TFRoFormerForSequenceClassification.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.TFRoFormerForSequenceClassification.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/roformer#transformers.RoFormerConfig"
>RoFormerConfig</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 be({props:{$$slots:{default:[wx]},$$scope:{ctx:P}}}),aa=new Me({props:{code:`from transformers import RoFormerTokenizer, TFRoFormerForSequenceClassification
import tensorflow as tf

tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = TFRoFormerForSequenceClassification.from_pretrained("junnyu/roformer_chinese_base")

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> RoFormerTokenizer, TFRoFormerForSequenceClassification
<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 = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&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`}}),ia=new xe({}),la=new N({props:{name:"class transformers.TFRoFormerForMultipleChoice",anchor:"transformers.TFRoFormerForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_tf_roformer.py#L1187",parametersDescription:[{anchor:"transformers.TFRoFormerForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</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"}]}}),Wn=new be({props:{$$slots:{default:[bx]},$$scope:{ctx:P}}}),ma=new N({props:{name:"call",anchor:"transformers.TFRoFormerForMultipleChoice.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:"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/roformer/modeling_tf_roformer.py#L1208",parametersDescription:[{anchor:"transformers.TFRoFormerForMultipleChoice.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/roformer#transformers.RoFormerTokenizer">RoFormerTokenizer</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.TFRoFormerForMultipleChoice.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.TFRoFormerForMultipleChoice.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.TFRoFormerForMultipleChoice.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.TFRoFormerForMultipleChoice.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.TFRoFormerForMultipleChoice.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.TFRoFormerForMultipleChoice.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.TFRoFormerForMultipleChoice.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.TFRoFormerForMultipleChoice.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.TFRoFormerForMultipleChoice.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/roformer#transformers.RoFormerConfig"
>RoFormerConfig</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>
`}}),Un=new be({props:{$$slots:{default:[$x]},$$scope:{ctx:P}}}),ha=new Me({props:{code:`from transformers import RoFormerTokenizer, TFRoFormerForMultipleChoice
import tensorflow as tf

tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = TFRoFormerForMultipleChoice.from_pretrained("junnyu/roformer_chinese_base")

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> RoFormerTokenizer, TFRoFormerForMultipleChoice
<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 = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&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`}}),fa=new xe({}),ua=new N({props:{name:"class transformers.TFRoFormerForTokenClassification",anchor:"transformers.TFRoFormerForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_tf_roformer.py#L1335",parametersDescription:[{anchor:"transformers.TFRoFormerForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</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"}]}}),Hn=new be({props:{$$slots:{default:[Rx]},$$scope:{ctx:P}}}),Fa=new N({props:{name:"call",anchor:"transformers.TFRoFormerForTokenClassification.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:"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/roformer/modeling_tf_roformer.py#L1347",parametersDescription:[{anchor:"transformers.TFRoFormerForTokenClassification.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/roformer#transformers.RoFormerTokenizer">RoFormerTokenizer</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.TFRoFormerForTokenClassification.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.TFRoFormerForTokenClassification.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.TFRoFormerForTokenClassification.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.TFRoFormerForTokenClassification.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.TFRoFormerForTokenClassification.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.TFRoFormerForTokenClassification.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.TFRoFormerForTokenClassification.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.TFRoFormerForTokenClassification.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.TFRoFormerForTokenClassification.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/roformer#transformers.RoFormerConfig"
>RoFormerConfig</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>
`}}),Qn=new be({props:{$$slots:{default:[Mx]},$$scope:{ctx:P}}}),va=new Me({props:{code:`from transformers import RoFormerTokenizer, TFRoFormerForTokenClassification
import tensorflow as tf

tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = TFRoFormerForTokenClassification.from_pretrained("junnyu/roformer_chinese_base")

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> RoFormerTokenizer, TFRoFormerForTokenClassification
<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 = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerForTokenClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&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`}}),ya=new xe({}),Ta=new N({props:{name:"class transformers.TFRoFormerForQuestionAnswering",anchor:"transformers.TFRoFormerForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_tf_roformer.py#L1428",parametersDescription:[{anchor:"transformers.TFRoFormerForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</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"}]}}),Jn=new be({props:{$$slots:{default:[xx]},$$scope:{ctx:P}}}),Ra=new N({props:{name:"call",anchor:"transformers.TFRoFormerForQuestionAnswering.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:"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/roformer/modeling_tf_roformer.py#L1439",parametersDescription:[{anchor:"transformers.TFRoFormerForQuestionAnswering.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/roformer#transformers.RoFormerTokenizer">RoFormerTokenizer</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.TFRoFormerForQuestionAnswering.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.TFRoFormerForQuestionAnswering.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.TFRoFormerForQuestionAnswering.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.TFRoFormerForQuestionAnswering.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.TFRoFormerForQuestionAnswering.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.TFRoFormerForQuestionAnswering.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.TFRoFormerForQuestionAnswering.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.TFRoFormerForQuestionAnswering.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.TFRoFormerForQuestionAnswering.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.TFRoFormerForQuestionAnswering.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/roformer#transformers.RoFormerConfig"
>RoFormerConfig</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>
`}}),Kn=new be({props:{$$slots:{default:[Ex]},$$scope:{ctx:P}}}),Ma=new Me({props:{code:`from transformers import RoFormerTokenizer, TFRoFormerForQuestionAnswering
import tensorflow as tf

tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = TFRoFormerForQuestionAnswering.from_pretrained("junnyu/roformer_chinese_base")

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> RoFormerTokenizer, TFRoFormerForQuestionAnswering
<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 = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRoFormerForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&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>])`}}),xa=new xe({}),Ea=new N({props:{name:"class transformers.FlaxRoFormerModel",anchor:"transformers.FlaxRoFormerModel",parameters:[{name:"config",val:": RoFormerConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax._src.numpy.lax_numpy.float32'>"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_flax_roformer.py#L737",parametersDescription:[{anchor:"transformers.FlaxRoFormerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</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.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerModel.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}]}}),Ia=new N({props:{name:"__call__",anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_flax_roformer.py#L643",parametersDescription:[{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerTokenizer">RoFormerTokenizer</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.FlaxRoFormerPreTrainedModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Xn=new be({props:{$$slots:{default:[zx]},$$scope:{ctx:P}}}),Da=new Me({props:{code:`from transformers import RoFormerTokenizer, FlaxRoFormerModel

tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = FlaxRoFormerModel.from_pretrained("junnyu/roformer_chinese_base")

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

last_hidden_states = outputs.last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RoFormerTokenizer, FlaxRoFormerModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRoFormerModel.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),Na=new xe({}),Oa=new N({props:{name:"class transformers.FlaxRoFormerForMaskedLM",anchor:"transformers.FlaxRoFormerForMaskedLM",parameters:[{name:"config",val:": RoFormerConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax._src.numpy.lax_numpy.float32'>"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_flax_roformer.py#L797",parametersDescription:[{anchor:"transformers.FlaxRoFormerForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</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.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerForMaskedLM.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}]}}),Ka=new N({props:{name:"__call__",anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_flax_roformer.py#L643",parametersDescription:[{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerTokenizer">RoFormerTokenizer</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.FlaxRoFormerPreTrainedModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Zn=new be({props:{$$slots:{default:[jx]},$$scope:{ctx:P}}}),Ga=new Me({props:{code:`from transformers import RoFormerTokenizer, FlaxRoFormerForMaskedLM

tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = FlaxRoFormerForMaskedLM.from_pretrained("junnyu/roformer_chinese_base")

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

outputs = model(**inputs)
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RoFormerTokenizer, FlaxRoFormerForMaskedLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRoFormerForMaskedLM.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),Xa=new xe({}),Ya=new N({props:{name:"class transformers.FlaxRoFormerForSequenceClassification",anchor:"transformers.FlaxRoFormerForSequenceClassification",parameters:[{name:"config",val:": RoFormerConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax._src.numpy.lax_numpy.float32'>"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_flax_roformer.py#L862",parametersDescription:[{anchor:"transformers.FlaxRoFormerForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</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.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerForSequenceClassification.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}]}}),ai=new N({props:{name:"__call__",anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_flax_roformer.py#L643",parametersDescription:[{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerTokenizer">RoFormerTokenizer</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.FlaxRoFormerPreTrainedModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),or=new be({props:{$$slots:{default:[qx]},$$scope:{ctx:P}}}),ii=new Me({props:{code:`from transformers import RoFormerTokenizer, FlaxRoFormerForSequenceClassification

tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = FlaxRoFormerForSequenceClassification.from_pretrained("junnyu/roformer_chinese_base")

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

outputs = model(**inputs)
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RoFormerTokenizer, FlaxRoFormerForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRoFormerForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),li=new xe({}),di=new N({props:{name:"class transformers.FlaxRoFormerForMultipleChoice",anchor:"transformers.FlaxRoFormerForMultipleChoice",parameters:[{name:"config",val:": RoFormerConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax._src.numpy.lax_numpy.float32'>"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_flax_roformer.py#L938",parametersDescription:[{anchor:"transformers.FlaxRoFormerForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</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.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerForMultipleChoice.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}]}}),_i=new N({props:{name:"__call__",anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_flax_roformer.py#L643",parametersDescription:[{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerTokenizer">RoFormerTokenizer</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.FlaxRoFormerPreTrainedModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),nr=new be({props:{$$slots:{default:[Cx]},$$scope:{ctx:P}}}),ki=new Me({props:{code:`from transformers import RoFormerTokenizer, FlaxRoFormerForMultipleChoice

tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = FlaxRoFormerForMultipleChoice.from_pretrained("junnyu/roformer_chinese_base")

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

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

logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RoFormerTokenizer, FlaxRoFormerForMultipleChoice

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRoFormerForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice0 = <span class="hljs-string">&quot;It is eaten with a fork and a knife.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice1 = <span class="hljs-string">&quot;It is eaten while held in the hand.&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;jax&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**{k: v[<span class="hljs-literal">None</span>, :] <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()})

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),Fi=new xe({}),vi=new N({props:{name:"class transformers.FlaxRoFormerForTokenClassification",anchor:"transformers.FlaxRoFormerForTokenClassification",parameters:[{name:"config",val:": RoFormerConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax._src.numpy.lax_numpy.float32'>"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_flax_roformer.py#L1007",parametersDescription:[{anchor:"transformers.FlaxRoFormerForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</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.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerForTokenClassification.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}]}}),xi=new N({props:{name:"__call__",anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_flax_roformer.py#L643",parametersDescription:[{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerTokenizer">RoFormerTokenizer</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.FlaxRoFormerPreTrainedModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),sr=new be({props:{$$slots:{default:[Px]},$$scope:{ctx:P}}}),Ei=new Me({props:{code:`from transformers import RoFormerTokenizer, FlaxRoFormerForTokenClassification

tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = FlaxRoFormerForTokenClassification.from_pretrained("junnyu/roformer_chinese_base")

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

outputs = model(**inputs)
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RoFormerTokenizer, FlaxRoFormerForTokenClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRoFormerForTokenClassification.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),zi=new xe({}),ji=new N({props:{name:"class transformers.FlaxRoFormerForQuestionAnswering",anchor:"transformers.FlaxRoFormerForQuestionAnswering",parameters:[{name:"config",val:": RoFormerConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax._src.numpy.lax_numpy.float32'>"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_flax_roformer.py#L1076",parametersDescription:[{anchor:"transformers.FlaxRoFormerForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig">RoFormerConfig</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.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRoFormerForQuestionAnswering.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}]}}),Ni=new N({props:{name:"__call__",anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roformer/modeling_flax_roformer.py#L643",parametersDescription:[{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerTokenizer">RoFormerTokenizer</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.FlaxRoFormerPreTrainedModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRoFormerPreTrainedModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerConfig"
>RoFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>start_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ir=new be({props:{$$slots:{default:[Ax]},$$scope:{ctx:P}}}),Oi=new Me({props:{code:`from transformers import RoFormerTokenizer, FlaxRoFormerForQuestionAnswering

tokenizer = RoFormerTokenizer.from_pretrained("junnyu/roformer_chinese_base")
model = FlaxRoFormerForQuestionAnswering.from_pretrained("junnyu/roformer_chinese_base")

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

outputs = model(**inputs)
start_scores = outputs.start_logits
end_scores = outputs.end_logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RoFormerTokenizer, FlaxRoFormerForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RoFormerTokenizer.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRoFormerForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;junnyu/roformer_chinese_base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_scores = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>end_scores = outputs.end_logits`}}),{c(){p=n("meta"),R=l(),g=n("h1"),_=n("a"),$=n("span"),F(k.$$.fragment),f=l(),M=n("span"),me=a("RoFormer"),K=l(),E=n("h2"),Z=n("a"),O=n("span"),F(oe.$$.fragment),he=l(),S=n("span"),fe=a("Overview"),le=l(),J=n("p"),L=a("The RoFormer model was proposed in "),te=n("a"),G=a("RoFormer: Enhanced Transformer with Rotary Position Embedding"),z=a(" by Jianlin Su and Yu Lu and Shengfeng Pan and Bo Wen and Yunfeng Liu."),q=l(),re=n("p"),B=a("The abstract from the paper is the following:"),de=l(),se=n("p"),W=n("em"),ue=a(`Position encoding in transformer architecture provides supervision for dependency modeling between elements at
different positions in the sequence. We investigate various methods to encode positional information in
transformer-based language models and propose a novel implementation named Rotary Position Embedding(RoPE). The
proposed RoPE encodes absolute positional information with rotation matrix and naturally incorporates explicit relative
position dependency in self-attention formulation. Notably, RoPE comes with valuable properties such as flexibility of
being expand to any sequence lengths, decaying inter-token dependency with increasing relative distances, and
capability of equipping the linear self-attention with relative position encoding. As a result, the enhanced
transformer with rotary position embedding, or RoFormer, achieves superior performance in tasks with long texts. We
release the theoretical analysis along with some preliminary experiment results on Chinese data. The undergoing
experiment for English benchmark will soon be updated.`),ce=l(),j=n("p"),ge=a("Tips:"),U=l(),ae=n("ul"),ie=n("li"),H=a(`RoFormer is a BERT-like autoencoding model with rotary position embeddings. Rotary position embeddings have shown
improved performance on classification tasks with long texts.`),pe=l(),X=n("p"),I=a("This model was contributed by "),ne=n("a"),Q=a("junnyu"),_e=a(". The original code can be found "),m=n("a"),x=a("here"),Y=a("."),$e=l(),Fe=n("h2"),C=n("a"),we=n("span"),F(ye.$$.fragment),Ee=l(),A=n("span"),V=a("RoFormerConfig"),Re=l(),ee=n("div"),F(D.$$.fragment),ze=l(),ve=n("p"),ke=a("This is the configuration class to store the configuration of a "),Te=n("a"),qf=a("RoFormerModel"),Cf=a(`. It is used to instantiate an
RoFormer 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 RoFormer
`),vr=n("a"),Pf=a("junnyu/roformer_chinese_base"),Af=a(" architecture."),Lf=l(),ut=n("p"),If=a("Configuration objects inherit from "),Hi=n("a"),Df=a("PretrainedConfig"),Nf=a(` and can be used to control the model outputs. Read the
documentation from `),Qi=n("a"),Of=a("PretrainedConfig"),Sf=a(" for more information."),Wf=l(),rd=n("p"),Uf=a("Example:"),Bf=l(),F(yr.$$.fragment),Em=l(),gt=n("h2"),mn=n("a"),sd=n("span"),F(Tr.$$.fragment),Hf=l(),ad=n("span"),Qf=a("RoFormerTokenizer"),zm=l(),je=n("div"),F(wr.$$.fragment),Vf=l(),br=n("p"),Jf=a("Construct a RoFormer tokenizer. Based on "),$r=n("a"),Kf=a("Rust Jieba"),Gf=a("."),Xf=l(),Rr=n("p"),Yf=a("This tokenizer inherits from "),Vi=n("a"),Zf=a("PreTrainedTokenizer"),eu=a(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),ou=l(),id=n("p"),tu=a("Example:"),nu=l(),F(Mr.$$.fragment),ru=l(),Jo=n("div"),F(xr.$$.fragment),su=l(),ld=n("p"),au=a(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RoFormer sequence has the following format:`),iu=l(),Er=n("ul"),Ji=n("li"),lu=a("single sequence: "),dd=n("code"),du=a("[CLS] X [SEP]"),cu=l(),Ki=n("li"),pu=a("pair of sequences: "),cd=n("code"),mu=a("[CLS] A [SEP] B [SEP]"),hu=l(),hn=n("div"),F(zr.$$.fragment),fu=l(),jr=n("p"),uu=a(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),pd=n("code"),gu=a("prepare_for_model"),_u=a(" method."),ku=l(),zo=n("div"),F(qr.$$.fragment),Fu=l(),md=n("p"),vu=a(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. A RoFormer
sequence pair mask has the following format:`),yu=l(),F(Cr.$$.fragment),Tu=l(),_t=n("p"),wu=a("If "),hd=n("code"),bu=a("token_ids_1"),$u=a(" is "),fd=n("code"),Ru=a("None"),Mu=a(", this method only returns the first portion of the mask (0s)."),xu=l(),Gi=n("div"),F(Pr.$$.fragment),jm=l(),kt=n("h2"),fn=n("a"),ud=n("span"),F(Ar.$$.fragment),Eu=l(),gd=n("span"),zu=a("RoFormerTokenizerFast"),qm=l(),qe=n("div"),F(Lr.$$.fragment),ju=l(),Ir=n("p"),qu=a("Construct a \u201Cfast\u201D RoFormer tokenizer (backed by HuggingFace\u2019s "),_d=n("em"),Cu=a("tokenizers"),Pu=a(" library)."),Au=l(),un=n("p"),Xi=n("a"),Lu=a("RoFormerTokenizerFast"),Iu=a(" is almost identical to "),Yi=n("a"),Du=a("BertTokenizerFast"),Nu=a(` and runs end-to-end tokenization:
punctuation splitting and wordpiece. There are some difference between them when tokenizing Chinese.`),Ou=l(),Dr=n("p"),Su=a("This tokenizer inherits from "),Zi=n("a"),Wu=a("PreTrainedTokenizerFast"),Uu=a(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Bu=l(),kd=n("p"),Hu=a("Example:"),Qu=l(),F(Nr.$$.fragment),Vu=l(),Ko=n("div"),F(Or.$$.fragment),Ju=l(),Fd=n("p"),Ku=a(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RoFormer sequence has the following format:`),Gu=l(),Sr=n("ul"),el=n("li"),Xu=a("single sequence: "),vd=n("code"),Yu=a("[CLS] X [SEP]"),Zu=l(),ol=n("li"),eg=a("pair of sequences: "),yd=n("code"),og=a("[CLS] A [SEP] B [SEP]"),Cm=l(),Ft=n("h2"),gn=n("a"),Td=n("span"),F(Wr.$$.fragment),tg=l(),wd=n("span"),ng=a("RoFormerModel"),Pm=l(),Ke=n("div"),F(Ur.$$.fragment),rg=l(),Br=n("p"),sg=a(`The bare RoFormer Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Hr=n("a"),ag=a("torch.nn.Module"),ig=a(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),lg=l(),Qr=n("p"),dg=a(`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 `),Vr=n("a"),cg=a(`Attention is
all you need`),pg=a(` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),mg=l(),Se=n("p"),hg=a("To behave as an decoder the model needs to be initialized with the "),bd=n("code"),fg=a("is_decoder"),ug=a(` argument of the configuration set
to `),$d=n("code"),gg=a("True"),_g=a(". To be used in a Seq2Seq model, the model needs to initialized with both "),Rd=n("code"),kg=a("is_decoder"),Fg=a(` argument and
`),Md=n("code"),vg=a("add_cross_attention"),yg=a(" set to "),xd=n("code"),Tg=a("True"),wg=a("; an "),Ed=n("code"),bg=a("encoder_hidden_states"),$g=a(" is then expected as an input to the forward pass."),Rg=l(),Xe=n("div"),F(Jr.$$.fragment),Mg=l(),vt=n("p"),xg=a("The "),tl=n("a"),Eg=a("RoFormerModel"),zg=a(" forward method, overrides the "),zd=n("code"),jg=a("__call__"),qg=a(" special method."),Cg=l(),F(_n.$$.fragment),Pg=l(),jd=n("p"),Ag=a("Example:"),Lg=l(),F(Kr.$$.fragment),Am=l(),yt=n("h2"),kn=n("a"),qd=n("span"),F(Gr.$$.fragment),Ig=l(),Cd=n("span"),Dg=a("RoFormerForCausalLM"),Lm=l(),Oo=n("div"),F(Xr.$$.fragment),Ng=l(),Tt=n("p"),Og=a("RoFormer Model with a "),Pd=n("code"),Sg=a("language modeling"),Wg=a(` head on top for CLM fine-tuning.
This model is a PyTorch `),Yr=n("a"),Ug=a("torch.nn.Module"),Bg=a(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Hg=l(),Ye=n("div"),F(Zr.$$.fragment),Qg=l(),wt=n("p"),Vg=a("The "),nl=n("a"),Jg=a("RoFormerForCausalLM"),Kg=a(" forward method, overrides the "),Ad=n("code"),Gg=a("__call__"),Xg=a(" special method."),Yg=l(),F(Fn.$$.fragment),Zg=l(),Ld=n("p"),e_=a("Example:"),o_=l(),F(es.$$.fragment),Im=l(),bt=n("h2"),vn=n("a"),Id=n("span"),F(os.$$.fragment),t_=l(),Dd=n("span"),n_=a("RoFormerForMaskedLM"),Dm=l(),So=n("div"),F(ts.$$.fragment),r_=l(),$t=n("p"),s_=a("RoFormer Model with a "),Nd=n("code"),a_=a("language modeling"),i_=a(` head on top.
This model is a PyTorch `),ns=n("a"),l_=a("torch.nn.Module"),d_=a(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),c_=l(),Ze=n("div"),F(rs.$$.fragment),p_=l(),Rt=n("p"),m_=a("The "),rl=n("a"),h_=a("RoFormerForMaskedLM"),f_=a(" forward method, overrides the "),Od=n("code"),u_=a("__call__"),g_=a(" special method."),__=l(),F(yn.$$.fragment),k_=l(),Sd=n("p"),F_=a("Example:"),v_=l(),F(ss.$$.fragment),Nm=l(),Mt=n("h2"),Tn=n("a"),Wd=n("span"),F(as.$$.fragment),y_=l(),Ud=n("span"),T_=a("RoFormerForSequenceClassification"),Om=l(),$o=n("div"),F(is.$$.fragment),w_=l(),Bd=n("p"),b_=a(`RoFormer Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),$_=l(),ls=n("p"),R_=a("This model is a PyTorch "),ds=n("a"),M_=a("torch.nn.Module"),x_=a(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),E_=l(),Ne=n("div"),F(cs.$$.fragment),z_=l(),xt=n("p"),j_=a("The "),sl=n("a"),q_=a("RoFormerForSequenceClassification"),C_=a(" forward method, overrides the "),Hd=n("code"),P_=a("__call__"),A_=a(" special method."),L_=l(),F(wn.$$.fragment),I_=l(),Qd=n("p"),D_=a("Example of single-label classification:"),N_=l(),F(ps.$$.fragment),O_=l(),Vd=n("p"),S_=a("Example of multi-label classification:"),W_=l(),F(ms.$$.fragment),Sm=l(),Et=n("h2"),bn=n("a"),Jd=n("span"),F(hs.$$.fragment),U_=l(),Kd=n("span"),B_=a("RoFormerForMultipleChoice"),Wm=l(),Ro=n("div"),F(fs.$$.fragment),H_=l(),Gd=n("p"),Q_=a(`RoFormer 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.`),V_=l(),us=n("p"),J_=a("This model is a PyTorch "),gs=n("a"),K_=a("torch.nn.Module"),G_=a(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),X_=l(),eo=n("div"),F(_s.$$.fragment),Y_=l(),zt=n("p"),Z_=a("The "),al=n("a"),ek=a("RoFormerForMultipleChoice"),ok=a(" forward method, overrides the "),Xd=n("code"),tk=a("__call__"),nk=a(" special method."),rk=l(),F($n.$$.fragment),sk=l(),Yd=n("p"),ak=a("Example:"),ik=l(),F(ks.$$.fragment),Um=l(),jt=n("h2"),Rn=n("a"),Zd=n("span"),F(Fs.$$.fragment),lk=l(),ec=n("span"),dk=a("RoFormerForTokenClassification"),Bm=l(),Mo=n("div"),F(vs.$$.fragment),ck=l(),oc=n("p"),pk=a(`RoFormer 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.`),mk=l(),ys=n("p"),hk=a("This model is a PyTorch "),Ts=n("a"),fk=a("torch.nn.Module"),uk=a(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),gk=l(),oo=n("div"),F(ws.$$.fragment),_k=l(),qt=n("p"),kk=a("The "),il=n("a"),Fk=a("RoFormerForTokenClassification"),vk=a(" forward method, overrides the "),tc=n("code"),yk=a("__call__"),Tk=a(" special method."),wk=l(),F(Mn.$$.fragment),bk=l(),nc=n("p"),$k=a("Example:"),Rk=l(),F(bs.$$.fragment),Hm=l(),Ct=n("h2"),xn=n("a"),rc=n("span"),F($s.$$.fragment),Mk=l(),sc=n("span"),xk=a("RoFormerForQuestionAnswering"),Qm=l(),xo=n("div"),F(Rs.$$.fragment),Ek=l(),Pt=n("p"),zk=a(`RoFormer 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 `),ac=n("code"),jk=a("span start logits"),qk=a(" and "),ic=n("code"),Ck=a("span end logits"),Pk=a(")."),Ak=l(),Ms=n("p"),Lk=a("This model is a PyTorch "),xs=n("a"),Ik=a("torch.nn.Module"),Dk=a(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Nk=l(),to=n("div"),F(Es.$$.fragment),Ok=l(),At=n("p"),Sk=a("The "),ll=n("a"),Wk=a("RoFormerForQuestionAnswering"),Uk=a(" forward method, overrides the "),lc=n("code"),Bk=a("__call__"),Hk=a(" special method."),Qk=l(),F(En.$$.fragment),Vk=l(),dc=n("p"),Jk=a("Example:"),Kk=l(),F(zs.$$.fragment),Vm=l(),Lt=n("h2"),zn=n("a"),cc=n("span"),F(js.$$.fragment),Gk=l(),pc=n("span"),Xk=a("TFRoFormerModel"),Jm=l(),We=n("div"),F(qs.$$.fragment),Yk=l(),mc=n("p"),Zk=a("The bare RoFormer Model transformer outputing raw hidden-states without any specific head on top."),eF=l(),Cs=n("p"),oF=a("This model inherits from "),dl=n("a"),tF=a("TFPreTrainedModel"),nF=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),rF=l(),Ps=n("p"),sF=a("This model is also a "),As=n("a"),aF=a("tf.keras.Model"),iF=a(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),lF=l(),F(jn.$$.fragment),dF=l(),no=n("div"),F(Ls.$$.fragment),cF=l(),It=n("p"),pF=a("The "),cl=n("a"),mF=a("TFRoFormerModel"),hF=a(" forward method, overrides the "),hc=n("code"),fF=a("__call__"),uF=a(" special method."),gF=l(),F(qn.$$.fragment),_F=l(),fc=n("p"),kF=a("Example:"),FF=l(),F(Is.$$.fragment),Km=l(),Dt=n("h2"),Cn=n("a"),uc=n("span"),F(Ds.$$.fragment),vF=l(),gc=n("span"),yF=a("TFRoFormerForMaskedLM"),Gm=l(),Ue=n("div"),F(Ns.$$.fragment),TF=l(),Os=n("p"),wF=a("RoFormer Model with a "),_c=n("code"),bF=a("language modeling"),$F=a(" head on top."),RF=l(),Ss=n("p"),MF=a("This model inherits from "),pl=n("a"),xF=a("TFPreTrainedModel"),EF=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),zF=l(),Ws=n("p"),jF=a("This model is also a "),Us=n("a"),qF=a("tf.keras.Model"),CF=a(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),PF=l(),F(Pn.$$.fragment),AF=l(),ro=n("div"),F(Bs.$$.fragment),LF=l(),Nt=n("p"),IF=a("The "),ml=n("a"),DF=a("TFRoFormerForMaskedLM"),NF=a(" forward method, overrides the "),kc=n("code"),OF=a("__call__"),SF=a(" special method."),WF=l(),F(An.$$.fragment),UF=l(),Fc=n("p"),BF=a("Example:"),HF=l(),F(Hs.$$.fragment),Xm=l(),Ot=n("h2"),Ln=n("a"),vc=n("span"),F(Qs.$$.fragment),QF=l(),yc=n("span"),VF=a("TFRoFormerForCausalLM"),Ym=l(),Be=n("div"),F(Vs.$$.fragment),JF=l(),Js=n("p"),KF=a("RoFormer Model with a "),Tc=n("code"),GF=a("language modeling"),XF=a(" head on top for CLM fine-tuning."),YF=l(),Ks=n("p"),ZF=a("This model inherits from "),hl=n("a"),ev=a("TFPreTrainedModel"),ov=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),tv=l(),Gs=n("p"),nv=a("This model is also a "),Xs=n("a"),rv=a("tf.keras.Model"),sv=a(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),av=l(),F(In.$$.fragment),iv=l(),jo=n("div"),F(Ys.$$.fragment),lv=l(),Ge=n("p"),dv=a("labels ("),wc=n("code"),cv=a("tf.Tensor"),pv=a(" or "),bc=n("code"),mv=a("np.ndarray"),hv=a(" of shape "),$c=n("code"),fv=a("(batch_size, sequence_length)"),uv=a(", "),Rc=n("em"),gv=a("optional"),_v=a(`):
Labels for computing the cross entropy classification loss. Indices should be in `),Mc=n("code"),kv=a("[0, ..., config.vocab_size - 1]"),Fv=a("."),vv=l(),xc=n("p"),yv=a("Example:"),Tv=l(),F(Zs.$$.fragment),Zm=l(),St=n("h2"),Dn=n("a"),Ec=n("span"),F(ea.$$.fragment),wv=l(),zc=n("span"),bv=a("TFRoFormerForSequenceClassification"),eh=l(),He=n("div"),F(oa.$$.fragment),$v=l(),jc=n("p"),Rv=a("RoFormer Model transformer with a sequence classification/regression head on top e.g., for GLUE tasks."),Mv=l(),ta=n("p"),xv=a("This model inherits from "),fl=n("a"),Ev=a("TFPreTrainedModel"),zv=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),jv=l(),na=n("p"),qv=a("This model is also a "),ra=n("a"),Cv=a("tf.keras.Model"),Pv=a(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Av=l(),F(Nn.$$.fragment),Lv=l(),so=n("div"),F(sa.$$.fragment),Iv=l(),Wt=n("p"),Dv=a("The "),ul=n("a"),Nv=a("TFRoFormerForSequenceClassification"),Ov=a(" forward method, overrides the "),qc=n("code"),Sv=a("__call__"),Wv=a(" special method."),Uv=l(),F(On.$$.fragment),Bv=l(),Cc=n("p"),Hv=a("Example:"),Qv=l(),F(aa.$$.fragment),oh=l(),Ut=n("h2"),Sn=n("a"),Pc=n("span"),F(ia.$$.fragment),Vv=l(),Ac=n("span"),Jv=a("TFRoFormerForMultipleChoice"),th=l(),Qe=n("div"),F(la.$$.fragment),Kv=l(),Lc=n("p"),Gv=a(`RoFormer 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.`),Xv=l(),da=n("p"),Yv=a("This model inherits from "),gl=n("a"),Zv=a("TFPreTrainedModel"),ey=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),oy=l(),ca=n("p"),ty=a("This model is also a "),pa=n("a"),ny=a("tf.keras.Model"),ry=a(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),sy=l(),F(Wn.$$.fragment),ay=l(),ao=n("div"),F(ma.$$.fragment),iy=l(),Bt=n("p"),ly=a("The "),_l=n("a"),dy=a("TFRoFormerForMultipleChoice"),cy=a(" forward method, overrides the "),Ic=n("code"),py=a("__call__"),my=a(" special method."),hy=l(),F(Un.$$.fragment),fy=l(),Dc=n("p"),uy=a("Example:"),gy=l(),F(ha.$$.fragment),nh=l(),Ht=n("h2"),Bn=n("a"),Nc=n("span"),F(fa.$$.fragment),_y=l(),Oc=n("span"),ky=a("TFRoFormerForTokenClassification"),rh=l(),Ve=n("div"),F(ua.$$.fragment),Fy=l(),Sc=n("p"),vy=a(`RoFormer 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.`),yy=l(),ga=n("p"),Ty=a("This model inherits from "),kl=n("a"),wy=a("TFPreTrainedModel"),by=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),$y=l(),_a=n("p"),Ry=a("This model is also a "),ka=n("a"),My=a("tf.keras.Model"),xy=a(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Ey=l(),F(Hn.$$.fragment),zy=l(),io=n("div"),F(Fa.$$.fragment),jy=l(),Qt=n("p"),qy=a("The "),Fl=n("a"),Cy=a("TFRoFormerForTokenClassification"),Py=a(" forward method, overrides the "),Wc=n("code"),Ay=a("__call__"),Ly=a(" special method."),Iy=l(),F(Qn.$$.fragment),Dy=l(),Uc=n("p"),Ny=a("Example:"),Oy=l(),F(va.$$.fragment),sh=l(),Vt=n("h2"),Vn=n("a"),Bc=n("span"),F(ya.$$.fragment),Sy=l(),Hc=n("span"),Wy=a("TFRoFormerForQuestionAnswering"),ah=l(),Je=n("div"),F(Ta.$$.fragment),Uy=l(),Jt=n("p"),By=a(`RoFormer 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 `),Qc=n("code"),Hy=a("span start logits"),Qy=a(" and "),Vc=n("code"),Vy=a("span end logits"),Jy=a(")."),Ky=l(),wa=n("p"),Gy=a("This model inherits from "),vl=n("a"),Xy=a("TFPreTrainedModel"),Yy=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Zy=l(),ba=n("p"),eT=a("This model is also a "),$a=n("a"),oT=a("tf.keras.Model"),tT=a(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),nT=l(),F(Jn.$$.fragment),rT=l(),lo=n("div"),F(Ra.$$.fragment),sT=l(),Kt=n("p"),aT=a("The "),yl=n("a"),iT=a("TFRoFormerForQuestionAnswering"),lT=a(" forward method, overrides the "),Jc=n("code"),dT=a("__call__"),cT=a(" special method."),pT=l(),F(Kn.$$.fragment),mT=l(),Kc=n("p"),hT=a("Example:"),fT=l(),F(Ma.$$.fragment),ih=l(),Gt=n("h2"),Gn=n("a"),Gc=n("span"),F(xa.$$.fragment),uT=l(),Xc=n("span"),gT=a("FlaxRoFormerModel"),lh=l(),Ce=n("div"),F(Ea.$$.fragment),_T=l(),Yc=n("p"),kT=a("The bare RoFormer Model transformer outputting raw hidden-states without any specific head on top."),FT=l(),za=n("p"),vT=a("This model inherits from "),Tl=n("a"),yT=a("FlaxPreTrainedModel"),TT=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),wT=l(),ja=n("p"),bT=a("This model is also a Flax Linen "),qa=n("a"),$T=a("flax.linen.Module"),RT=a(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),MT=l(),Zc=n("p"),xT=a("Finally, this model supports inherent JAX features such as:"),ET=l(),Wo=n("ul"),ep=n("li"),Ca=n("a"),zT=a("Just-In-Time (JIT) compilation"),jT=l(),op=n("li"),Pa=n("a"),qT=a("Automatic Differentiation"),CT=l(),tp=n("li"),Aa=n("a"),PT=a("Vectorization"),AT=l(),np=n("li"),La=n("a"),LT=a("Parallelization"),IT=l(),co=n("div"),F(Ia.$$.fragment),DT=l(),Xt=n("p"),NT=a("The "),rp=n("code"),OT=a("FlaxRoFormerPreTrainedModel"),ST=a("forward method, overrides the "),sp=n("code"),WT=a("__call__"),UT=a(" special method."),BT=l(),F(Xn.$$.fragment),HT=l(),ap=n("p"),QT=a("Example:"),VT=l(),F(Da.$$.fragment),dh=l(),Yt=n("h2"),Yn=n("a"),ip=n("span"),F(Na.$$.fragment),JT=l(),lp=n("span"),KT=a("FlaxRoFormerForMaskedLM"),ch=l(),Pe=n("div"),F(Oa.$$.fragment),GT=l(),Sa=n("p"),XT=a("RoFormer Model with a "),dp=n("code"),YT=a("language modeling"),ZT=a(" head on top."),e1=l(),Wa=n("p"),o1=a("This model inherits from "),wl=n("a"),t1=a("FlaxPreTrainedModel"),n1=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),r1=l(),Ua=n("p"),s1=a("This model is also a Flax Linen "),Ba=n("a"),a1=a("flax.linen.Module"),i1=a(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),l1=l(),cp=n("p"),d1=a("Finally, this model supports inherent JAX features such as:"),c1=l(),Uo=n("ul"),pp=n("li"),Ha=n("a"),p1=a("Just-In-Time (JIT) compilation"),m1=l(),mp=n("li"),Qa=n("a"),h1=a("Automatic Differentiation"),f1=l(),hp=n("li"),Va=n("a"),u1=a("Vectorization"),g1=l(),fp=n("li"),Ja=n("a"),_1=a("Parallelization"),k1=l(),po=n("div"),F(Ka.$$.fragment),F1=l(),Zt=n("p"),v1=a("The "),up=n("code"),y1=a("FlaxRoFormerPreTrainedModel"),T1=a("forward method, overrides the "),gp=n("code"),w1=a("__call__"),b1=a(" special method."),$1=l(),F(Zn.$$.fragment),R1=l(),_p=n("p"),M1=a("Example:"),x1=l(),F(Ga.$$.fragment),ph=l(),en=n("h2"),er=n("a"),kp=n("span"),F(Xa.$$.fragment),E1=l(),Fp=n("span"),z1=a("FlaxRoFormerForSequenceClassification"),mh=l(),Ae=n("div"),F(Ya.$$.fragment),j1=l(),vp=n("p"),q1=a(`RoFormer Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),C1=l(),Za=n("p"),P1=a("This model inherits from "),bl=n("a"),A1=a("FlaxPreTrainedModel"),L1=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),I1=l(),ei=n("p"),D1=a("This model is also a Flax Linen "),oi=n("a"),N1=a("flax.linen.Module"),O1=a(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),S1=l(),yp=n("p"),W1=a("Finally, this model supports inherent JAX features such as:"),U1=l(),Bo=n("ul"),Tp=n("li"),ti=n("a"),B1=a("Just-In-Time (JIT) compilation"),H1=l(),wp=n("li"),ni=n("a"),Q1=a("Automatic Differentiation"),V1=l(),bp=n("li"),ri=n("a"),J1=a("Vectorization"),K1=l(),$p=n("li"),si=n("a"),G1=a("Parallelization"),X1=l(),mo=n("div"),F(ai.$$.fragment),Y1=l(),on=n("p"),Z1=a("The "),Rp=n("code"),ew=a("FlaxRoFormerPreTrainedModel"),ow=a("forward method, overrides the "),Mp=n("code"),tw=a("__call__"),nw=a(" special method."),rw=l(),F(or.$$.fragment),sw=l(),xp=n("p"),aw=a("Example:"),iw=l(),F(ii.$$.fragment),hh=l(),tn=n("h2"),tr=n("a"),Ep=n("span"),F(li.$$.fragment),lw=l(),zp=n("span"),dw=a("FlaxRoFormerForMultipleChoice"),fh=l(),Le=n("div"),F(di.$$.fragment),cw=l(),jp=n("p"),pw=a(`RoFormer 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.`),mw=l(),ci=n("p"),hw=a("This model inherits from "),$l=n("a"),fw=a("FlaxPreTrainedModel"),uw=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),gw=l(),pi=n("p"),_w=a("This model is also a Flax Linen "),mi=n("a"),kw=a("flax.linen.Module"),Fw=a(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),vw=l(),qp=n("p"),yw=a("Finally, this model supports inherent JAX features such as:"),Tw=l(),Ho=n("ul"),Cp=n("li"),hi=n("a"),ww=a("Just-In-Time (JIT) compilation"),bw=l(),Pp=n("li"),fi=n("a"),$w=a("Automatic Differentiation"),Rw=l(),Ap=n("li"),ui=n("a"),Mw=a("Vectorization"),xw=l(),Lp=n("li"),gi=n("a"),Ew=a("Parallelization"),zw=l(),ho=n("div"),F(_i.$$.fragment),jw=l(),nn=n("p"),qw=a("The "),Ip=n("code"),Cw=a("FlaxRoFormerPreTrainedModel"),Pw=a("forward method, overrides the "),Dp=n("code"),Aw=a("__call__"),Lw=a(" special method."),Iw=l(),F(nr.$$.fragment),Dw=l(),Np=n("p"),Nw=a("Example:"),Ow=l(),F(ki.$$.fragment),uh=l(),rn=n("h2"),rr=n("a"),Op=n("span"),F(Fi.$$.fragment),Sw=l(),Sp=n("span"),Ww=a("FlaxRoFormerForTokenClassification"),gh=l(),Ie=n("div"),F(vi.$$.fragment),Uw=l(),Wp=n("p"),Bw=a(`RoFormer 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.`),Hw=l(),yi=n("p"),Qw=a("This model inherits from "),Rl=n("a"),Vw=a("FlaxPreTrainedModel"),Jw=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Kw=l(),Ti=n("p"),Gw=a("This model is also a Flax Linen "),wi=n("a"),Xw=a("flax.linen.Module"),Yw=a(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Zw=l(),Up=n("p"),eb=a("Finally, this model supports inherent JAX features such as:"),ob=l(),Qo=n("ul"),Bp=n("li"),bi=n("a"),tb=a("Just-In-Time (JIT) compilation"),nb=l(),Hp=n("li"),$i=n("a"),rb=a("Automatic Differentiation"),sb=l(),Qp=n("li"),Ri=n("a"),ab=a("Vectorization"),ib=l(),Vp=n("li"),Mi=n("a"),lb=a("Parallelization"),db=l(),fo=n("div"),F(xi.$$.fragment),cb=l(),sn=n("p"),pb=a("The "),Jp=n("code"),mb=a("FlaxRoFormerPreTrainedModel"),hb=a("forward method, overrides the "),Kp=n("code"),fb=a("__call__"),ub=a(" special method."),gb=l(),F(sr.$$.fragment),_b=l(),Gp=n("p"),kb=a("Example:"),Fb=l(),F(Ei.$$.fragment),_h=l(),an=n("h2"),ar=n("a"),Xp=n("span"),F(zi.$$.fragment),vb=l(),Yp=n("span"),yb=a("FlaxRoFormerForQuestionAnswering"),kh=l(),De=n("div"),F(ji.$$.fragment),Tb=l(),ln=n("p"),wb=a(`RoFormer 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 `),Zp=n("code"),bb=a("span start logits"),$b=a(" and "),em=n("code"),Rb=a("span end logits"),Mb=a(")."),xb=l(),qi=n("p"),Eb=a("This model inherits from "),Ml=n("a"),zb=a("FlaxPreTrainedModel"),jb=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),qb=l(),Ci=n("p"),Cb=a("This model is also a Flax Linen "),Pi=n("a"),Pb=a("flax.linen.Module"),Ab=a(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Lb=l(),om=n("p"),Ib=a("Finally, this model supports inherent JAX features such as:"),Db=l(),Vo=n("ul"),tm=n("li"),Ai=n("a"),Nb=a("Just-In-Time (JIT) compilation"),Ob=l(),nm=n("li"),Li=n("a"),Sb=a("Automatic Differentiation"),Wb=l(),rm=n("li"),Ii=n("a"),Ub=a("Vectorization"),Bb=l(),sm=n("li"),Di=n("a"),Hb=a("Parallelization"),Qb=l(),uo=n("div"),F(Ni.$$.fragment),Vb=l(),dn=n("p"),Jb=a("The "),am=n("code"),Kb=a("FlaxRoFormerPreTrainedModel"),Gb=a("forward method, overrides the "),im=n("code"),Xb=a("__call__"),Yb=a(" special method."),Zb=l(),F(ir.$$.fragment),e$=l(),lm=n("p"),o$=a("Example:"),t$=l(),F(Oi.$$.fragment),this.h()},l(t){const u=dx('[data-svelte="svelte-1phssyn"]',document.head);p=r(u,"META",{name:!0,content:!0}),u.forEach(o),R=d(t),g=r(t,"H1",{class:!0});var Si=s(g);_=r(Si,"A",{id:!0,class:!0,href:!0});var dm=s(_);$=r(dm,"SPAN",{});var cm=s($);v(k.$$.fragment,cm),cm.forEach(o),dm.forEach(o),f=d(Si),M=r(Si,"SPAN",{});var pm=s(M);me=i(pm,"RoFormer"),pm.forEach(o),Si.forEach(o),K=d(t),E=r(t,"H2",{class:!0});var Wi=s(E);Z=r(Wi,"A",{id:!0,class:!0,href:!0});var mm=s(Z);O=r(mm,"SPAN",{});var hm=s(O);v(oe.$$.fragment,hm),hm.forEach(o),mm.forEach(o),he=d(Wi),S=r(Wi,"SPAN",{});var fm=s(S);fe=i(fm,"Overview"),fm.forEach(o),Wi.forEach(o),le=d(t),J=r(t,"P",{});var Ui=s(J);L=i(Ui,"The RoFormer model was proposed in "),te=r(Ui,"A",{href:!0,rel:!0});var um=s(te);G=i(um,"RoFormer: Enhanced Transformer with Rotary Position Embedding"),um.forEach(o),z=i(Ui," by Jianlin Su and Yu Lu and Shengfeng Pan and Bo Wen and Yunfeng Liu."),Ui.forEach(o),q=d(t),re=r(t,"P",{});var gm=s(re);B=i(gm,"The abstract from the paper is the following:"),gm.forEach(o),de=d(t),se=r(t,"P",{});var _m=s(se);W=r(_m,"EM",{});var km=s(W);ue=i(km,`Position encoding in transformer architecture provides supervision for dependency modeling between elements at
different positions in the sequence. We investigate various methods to encode positional information in
transformer-based language models and propose a novel implementation named Rotary Position Embedding(RoPE). The
proposed RoPE encodes absolute positional information with rotation matrix and naturally incorporates explicit relative
position dependency in self-attention formulation. Notably, RoPE comes with valuable properties such as flexibility of
being expand to any sequence lengths, decaying inter-token dependency with increasing relative distances, and
capability of equipping the linear self-attention with relative position encoding. As a result, the enhanced
transformer with rotary position embedding, or RoFormer, achieves superior performance in tasks with long texts. We
release the theoretical analysis along with some preliminary experiment results on Chinese data. The undergoing
experiment for English benchmark will soon be updated.`),km.forEach(o),_m.forEach(o),ce=d(t),j=r(t,"P",{});var Fm=s(j);ge=i(Fm,"Tips:"),Fm.forEach(o),U=d(t),ae=r(t,"UL",{});var vm=s(ae);ie=r(vm,"LI",{});var ym=s(ie);H=i(ym,`RoFormer is a BERT-like autoencoding model with rotary position embeddings. Rotary position embeddings have shown
improved performance on classification tasks with long texts.`),ym.forEach(o),vm.forEach(o),pe=d(t),X=r(t,"P",{});var cn=s(X);I=i(cn,"This model was contributed by "),ne=r(cn,"A",{href:!0,rel:!0});var Tm=s(ne);Q=i(Tm,"junnyu"),Tm.forEach(o),_e=i(cn,". The original code can be found "),m=r(cn,"A",{href:!0,rel:!0});var wm=s(m);x=i(wm,"here"),wm.forEach(o),Y=i(cn,"."),cn.forEach(o),$e=d(t),Fe=r(t,"H2",{class:!0});var Bi=s(Fe);C=r(Bi,"A",{id:!0,class:!0,href:!0});var bm=s(C);we=r(bm,"SPAN",{});var $m=s(we);v(ye.$$.fragment,$m),$m.forEach(o),bm.forEach(o),Ee=d(Bi),A=r(Bi,"SPAN",{});var Rm=s(A);V=i(Rm,"RoFormerConfig"),Rm.forEach(o),Bi.forEach(o),Re=d(t),ee=r(t,"DIV",{class:!0});var Eo=s(ee);v(D.$$.fragment,Eo),ze=d(Eo),ve=r(Eo,"P",{});var pn=s(ve);ke=i(pn,"This is the configuration class to store the configuration of a "),Te=r(pn,"A",{href:!0});var Mm=s(Te);qf=i(Mm,"RoFormerModel"),Mm.forEach(o),Cf=i(pn,`. It is used to instantiate an
RoFormer 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 RoFormer
`),vr=r(pn,"A",{href:!0,rel:!0});var i$=s(vr);Pf=i(i$,"junnyu/roformer_chinese_base"),i$.forEach(o),Af=i(pn," architecture."),pn.forEach(o),Lf=d(Eo),ut=r(Eo,"P",{});var xl=s(ut);If=i(xl,"Configuration objects inherit from "),Hi=r(xl,"A",{href:!0});var l$=s(Hi);Df=i(l$,"PretrainedConfig"),l$.forEach(o),Nf=i(xl,` and can be used to control the model outputs. Read the
documentation from `),Qi=r(xl,"A",{href:!0});var d$=s(Qi);Of=i(d$,"PretrainedConfig"),d$.forEach(o),Sf=i(xl," for more information."),xl.forEach(o),Wf=d(Eo),rd=r(Eo,"P",{});var c$=s(rd);Uf=i(c$,"Example:"),c$.forEach(o),Bf=d(Eo),v(yr.$$.fragment,Eo),Eo.forEach(o),Em=d(t),gt=r(t,"H2",{class:!0});var vh=s(gt);mn=r(vh,"A",{id:!0,class:!0,href:!0});var p$=s(mn);sd=r(p$,"SPAN",{});var m$=s(sd);v(Tr.$$.fragment,m$),m$.forEach(o),p$.forEach(o),Hf=d(vh),ad=r(vh,"SPAN",{});var h$=s(ad);Qf=i(h$,"RoFormerTokenizer"),h$.forEach(o),vh.forEach(o),zm=d(t),je=r(t,"DIV",{class:!0});var Oe=s(je);v(wr.$$.fragment,Oe),Vf=d(Oe),br=r(Oe,"P",{});var yh=s(br);Jf=i(yh,"Construct a RoFormer tokenizer. Based on "),$r=r(yh,"A",{href:!0,rel:!0});var f$=s($r);Kf=i(f$,"Rust Jieba"),f$.forEach(o),Gf=i(yh,"."),yh.forEach(o),Xf=d(Oe),Rr=r(Oe,"P",{});var Th=s(Rr);Yf=i(Th,"This tokenizer inherits from "),Vi=r(Th,"A",{href:!0});var u$=s(Vi);Zf=i(u$,"PreTrainedTokenizer"),u$.forEach(o),eu=i(Th,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Th.forEach(o),ou=d(Oe),id=r(Oe,"P",{});var g$=s(id);tu=i(g$,"Example:"),g$.forEach(o),nu=d(Oe),v(Mr.$$.fragment,Oe),ru=d(Oe),Jo=r(Oe,"DIV",{class:!0});var El=s(Jo);v(xr.$$.fragment,El),su=d(El),ld=r(El,"P",{});var _$=s(ld);au=i(_$,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RoFormer sequence has the following format:`),_$.forEach(o),iu=d(El),Er=r(El,"UL",{});var wh=s(Er);Ji=r(wh,"LI",{});var n$=s(Ji);lu=i(n$,"single sequence: "),dd=r(n$,"CODE",{});var k$=s(dd);du=i(k$,"[CLS] X [SEP]"),k$.forEach(o),n$.forEach(o),cu=d(wh),Ki=r(wh,"LI",{});var r$=s(Ki);pu=i(r$,"pair of sequences: "),cd=r(r$,"CODE",{});var F$=s(cd);mu=i(F$,"[CLS] A [SEP] B [SEP]"),F$.forEach(o),r$.forEach(o),wh.forEach(o),El.forEach(o),hu=d(Oe),hn=r(Oe,"DIV",{class:!0});var bh=s(hn);v(zr.$$.fragment,bh),fu=d(bh),jr=r(bh,"P",{});var $h=s(jr);uu=i($h,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),pd=r($h,"CODE",{});var v$=s(pd);gu=i(v$,"prepare_for_model"),v$.forEach(o),_u=i($h," method."),$h.forEach(o),bh.forEach(o),ku=d(Oe),zo=r(Oe,"DIV",{class:!0});var lr=s(zo);v(qr.$$.fragment,lr),Fu=d(lr),md=r(lr,"P",{});var y$=s(md);vu=i(y$,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. A RoFormer
sequence pair mask has the following format:`),y$.forEach(o),yu=d(lr),v(Cr.$$.fragment,lr),Tu=d(lr),_t=r(lr,"P",{});var zl=s(_t);wu=i(zl,"If "),hd=r(zl,"CODE",{});var T$=s(hd);bu=i(T$,"token_ids_1"),T$.forEach(o),$u=i(zl," is "),fd=r(zl,"CODE",{});var w$=s(fd);Ru=i(w$,"None"),w$.forEach(o),Mu=i(zl,", this method only returns the first portion of the mask (0s)."),zl.forEach(o),lr.forEach(o),xu=d(Oe),Gi=r(Oe,"DIV",{class:!0});var b$=s(Gi);v(Pr.$$.fragment,b$),b$.forEach(o),Oe.forEach(o),jm=d(t),kt=r(t,"H2",{class:!0});var Rh=s(kt);fn=r(Rh,"A",{id:!0,class:!0,href:!0});var $$=s(fn);ud=r($$,"SPAN",{});var R$=s(ud);v(Ar.$$.fragment,R$),R$.forEach(o),$$.forEach(o),Eu=d(Rh),gd=r(Rh,"SPAN",{});var M$=s(gd);zu=i(M$,"RoFormerTokenizerFast"),M$.forEach(o),Rh.forEach(o),qm=d(t),qe=r(t,"DIV",{class:!0});var go=s(qe);v(Lr.$$.fragment,go),ju=d(go),Ir=r(go,"P",{});var Mh=s(Ir);qu=i(Mh,"Construct a \u201Cfast\u201D RoFormer tokenizer (backed by HuggingFace\u2019s "),_d=r(Mh,"EM",{});var x$=s(_d);Cu=i(x$,"tokenizers"),x$.forEach(o),Pu=i(Mh," library)."),Mh.forEach(o),Au=d(go),un=r(go,"P",{});var xm=s(un);Xi=r(xm,"A",{href:!0});var E$=s(Xi);Lu=i(E$,"RoFormerTokenizerFast"),E$.forEach(o),Iu=i(xm," is almost identical to "),Yi=r(xm,"A",{href:!0});var z$=s(Yi);Du=i(z$,"BertTokenizerFast"),z$.forEach(o),Nu=i(xm,` and runs end-to-end tokenization:
punctuation splitting and wordpiece. There are some difference between them when tokenizing Chinese.`),xm.forEach(o),Ou=d(go),Dr=r(go,"P",{});var xh=s(Dr);Su=i(xh,"This tokenizer inherits from "),Zi=r(xh,"A",{href:!0});var j$=s(Zi);Wu=i(j$,"PreTrainedTokenizerFast"),j$.forEach(o),Uu=i(xh,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),xh.forEach(o),Bu=d(go),kd=r(go,"P",{});var q$=s(kd);Hu=i(q$,"Example:"),q$.forEach(o),Qu=d(go),v(Nr.$$.fragment,go),Vu=d(go),Ko=r(go,"DIV",{class:!0});var jl=s(Ko);v(Or.$$.fragment,jl),Ju=d(jl),Fd=r(jl,"P",{});var C$=s(Fd);Ku=i(C$,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RoFormer sequence has the following format:`),C$.forEach(o),Gu=d(jl),Sr=r(jl,"UL",{});var Eh=s(Sr);el=r(Eh,"LI",{});var s$=s(el);Xu=i(s$,"single sequence: "),vd=r(s$,"CODE",{});var P$=s(vd);Yu=i(P$,"[CLS] X [SEP]"),P$.forEach(o),s$.forEach(o),Zu=d(Eh),ol=r(Eh,"LI",{});var a$=s(ol);eg=i(a$,"pair of sequences: "),yd=r(a$,"CODE",{});var A$=s(yd);og=i(A$,"[CLS] A [SEP] B [SEP]"),A$.forEach(o),a$.forEach(o),Eh.forEach(o),jl.forEach(o),go.forEach(o),Cm=d(t),Ft=r(t,"H2",{class:!0});var zh=s(Ft);gn=r(zh,"A",{id:!0,class:!0,href:!0});var L$=s(gn);Td=r(L$,"SPAN",{});var I$=s(Td);v(Wr.$$.fragment,I$),I$.forEach(o),L$.forEach(o),tg=d(zh),wd=r(zh,"SPAN",{});var D$=s(wd);ng=i(D$,"RoFormerModel"),D$.forEach(o),zh.forEach(o),Pm=d(t),Ke=r(t,"DIV",{class:!0});var Go=s(Ke);v(Ur.$$.fragment,Go),rg=d(Go),Br=r(Go,"P",{});var jh=s(Br);sg=i(jh,`The bare RoFormer Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Hr=r(jh,"A",{href:!0,rel:!0});var N$=s(Hr);ag=i(N$,"torch.nn.Module"),N$.forEach(o),ig=i(jh,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),jh.forEach(o),lg=d(Go),Qr=r(Go,"P",{});var qh=s(Qr);dg=i(qh,`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 `),Vr=r(qh,"A",{href:!0,rel:!0});var O$=s(Vr);cg=i(O$,`Attention is
all you need`),O$.forEach(o),pg=i(qh,` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),qh.forEach(o),mg=d(Go),Se=r(Go,"P",{});var _o=s(Se);hg=i(_o,"To behave as an decoder the model needs to be initialized with the "),bd=r(_o,"CODE",{});var S$=s(bd);fg=i(S$,"is_decoder"),S$.forEach(o),ug=i(_o,` argument of the configuration set
to `),$d=r(_o,"CODE",{});var W$=s($d);gg=i(W$,"True"),W$.forEach(o),_g=i(_o,". To be used in a Seq2Seq model, the model needs to initialized with both "),Rd=r(_o,"CODE",{});var U$=s(Rd);kg=i(U$,"is_decoder"),U$.forEach(o),Fg=i(_o,` argument and
`),Md=r(_o,"CODE",{});var B$=s(Md);vg=i(B$,"add_cross_attention"),B$.forEach(o),yg=i(_o," set to "),xd=r(_o,"CODE",{});var H$=s(xd);Tg=i(H$,"True"),H$.forEach(o),wg=i(_o,"; an "),Ed=r(_o,"CODE",{});var Q$=s(Ed);bg=i(Q$,"encoder_hidden_states"),Q$.forEach(o),$g=i(_o," is then expected as an input to the forward pass."),_o.forEach(o),Rg=d(Go),Xe=r(Go,"DIV",{class:!0});var Xo=s(Xe);v(Jr.$$.fragment,Xo),Mg=d(Xo),vt=r(Xo,"P",{});var ql=s(vt);xg=i(ql,"The "),tl=r(ql,"A",{href:!0});var V$=s(tl);Eg=i(V$,"RoFormerModel"),V$.forEach(o),zg=i(ql," forward method, overrides the "),zd=r(ql,"CODE",{});var J$=s(zd);jg=i(J$,"__call__"),J$.forEach(o),qg=i(ql," special method."),ql.forEach(o),Cg=d(Xo),v(_n.$$.fragment,Xo),Pg=d(Xo),jd=r(Xo,"P",{});var K$=s(jd);Ag=i(K$,"Example:"),K$.forEach(o),Lg=d(Xo),v(Kr.$$.fragment,Xo),Xo.forEach(o),Go.forEach(o),Am=d(t),yt=r(t,"H2",{class:!0});var Ch=s(yt);kn=r(Ch,"A",{id:!0,class:!0,href:!0});var G$=s(kn);qd=r(G$,"SPAN",{});var X$=s(qd);v(Gr.$$.fragment,X$),X$.forEach(o),G$.forEach(o),Ig=d(Ch),Cd=r(Ch,"SPAN",{});var Y$=s(Cd);Dg=i(Y$,"RoFormerForCausalLM"),Y$.forEach(o),Ch.forEach(o),Lm=d(t),Oo=r(t,"DIV",{class:!0});var Cl=s(Oo);v(Xr.$$.fragment,Cl),Ng=d(Cl),Tt=r(Cl,"P",{});var Pl=s(Tt);Og=i(Pl,"RoFormer Model with a "),Pd=r(Pl,"CODE",{});var Z$=s(Pd);Sg=i(Z$,"language modeling"),Z$.forEach(o),Wg=i(Pl,` head on top for CLM fine-tuning.
This model is a PyTorch `),Yr=r(Pl,"A",{href:!0,rel:!0});var e2=s(Yr);Ug=i(e2,"torch.nn.Module"),e2.forEach(o),Bg=i(Pl,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Pl.forEach(o),Hg=d(Cl),Ye=r(Cl,"DIV",{class:!0});var Yo=s(Ye);v(Zr.$$.fragment,Yo),Qg=d(Yo),wt=r(Yo,"P",{});var Al=s(wt);Vg=i(Al,"The "),nl=r(Al,"A",{href:!0});var o2=s(nl);Jg=i(o2,"RoFormerForCausalLM"),o2.forEach(o),Kg=i(Al," forward method, overrides the "),Ad=r(Al,"CODE",{});var t2=s(Ad);Gg=i(t2,"__call__"),t2.forEach(o),Xg=i(Al," special method."),Al.forEach(o),Yg=d(Yo),v(Fn.$$.fragment,Yo),Zg=d(Yo),Ld=r(Yo,"P",{});var n2=s(Ld);e_=i(n2,"Example:"),n2.forEach(o),o_=d(Yo),v(es.$$.fragment,Yo),Yo.forEach(o),Cl.forEach(o),Im=d(t),bt=r(t,"H2",{class:!0});var Ph=s(bt);vn=r(Ph,"A",{id:!0,class:!0,href:!0});var r2=s(vn);Id=r(r2,"SPAN",{});var s2=s(Id);v(os.$$.fragment,s2),s2.forEach(o),r2.forEach(o),t_=d(Ph),Dd=r(Ph,"SPAN",{});var a2=s(Dd);n_=i(a2,"RoFormerForMaskedLM"),a2.forEach(o),Ph.forEach(o),Dm=d(t),So=r(t,"DIV",{class:!0});var Ll=s(So);v(ts.$$.fragment,Ll),r_=d(Ll),$t=r(Ll,"P",{});var Il=s($t);s_=i(Il,"RoFormer Model with a "),Nd=r(Il,"CODE",{});var i2=s(Nd);a_=i(i2,"language modeling"),i2.forEach(o),i_=i(Il,` head on top.
This model is a PyTorch `),ns=r(Il,"A",{href:!0,rel:!0});var l2=s(ns);l_=i(l2,"torch.nn.Module"),l2.forEach(o),d_=i(Il,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Il.forEach(o),c_=d(Ll),Ze=r(Ll,"DIV",{class:!0});var Zo=s(Ze);v(rs.$$.fragment,Zo),p_=d(Zo),Rt=r(Zo,"P",{});var Dl=s(Rt);m_=i(Dl,"The "),rl=r(Dl,"A",{href:!0});var d2=s(rl);h_=i(d2,"RoFormerForMaskedLM"),d2.forEach(o),f_=i(Dl," forward method, overrides the "),Od=r(Dl,"CODE",{});var c2=s(Od);u_=i(c2,"__call__"),c2.forEach(o),g_=i(Dl," special method."),Dl.forEach(o),__=d(Zo),v(yn.$$.fragment,Zo),k_=d(Zo),Sd=r(Zo,"P",{});var p2=s(Sd);F_=i(p2,"Example:"),p2.forEach(o),v_=d(Zo),v(ss.$$.fragment,Zo),Zo.forEach(o),Ll.forEach(o),Nm=d(t),Mt=r(t,"H2",{class:!0});var Ah=s(Mt);Tn=r(Ah,"A",{id:!0,class:!0,href:!0});var m2=s(Tn);Wd=r(m2,"SPAN",{});var h2=s(Wd);v(as.$$.fragment,h2),h2.forEach(o),m2.forEach(o),y_=d(Ah),Ud=r(Ah,"SPAN",{});var f2=s(Ud);T_=i(f2,"RoFormerForSequenceClassification"),f2.forEach(o),Ah.forEach(o),Om=d(t),$o=r(t,"DIV",{class:!0});var dr=s($o);v(is.$$.fragment,dr),w_=d(dr),Bd=r(dr,"P",{});var u2=s(Bd);b_=i(u2,`RoFormer Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),u2.forEach(o),$_=d(dr),ls=r(dr,"P",{});var Lh=s(ls);R_=i(Lh,"This model is a PyTorch "),ds=r(Lh,"A",{href:!0,rel:!0});var g2=s(ds);M_=i(g2,"torch.nn.Module"),g2.forEach(o),x_=i(Lh,` 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.forEach(o),E_=d(dr),Ne=r(dr,"DIV",{class:!0});var ko=s(Ne);v(cs.$$.fragment,ko),z_=d(ko),xt=r(ko,"P",{});var Nl=s(xt);j_=i(Nl,"The "),sl=r(Nl,"A",{href:!0});var _2=s(sl);q_=i(_2,"RoFormerForSequenceClassification"),_2.forEach(o),C_=i(Nl," forward method, overrides the "),Hd=r(Nl,"CODE",{});var k2=s(Hd);P_=i(k2,"__call__"),k2.forEach(o),A_=i(Nl," special method."),Nl.forEach(o),L_=d(ko),v(wn.$$.fragment,ko),I_=d(ko),Qd=r(ko,"P",{});var F2=s(Qd);D_=i(F2,"Example of single-label classification:"),F2.forEach(o),N_=d(ko),v(ps.$$.fragment,ko),O_=d(ko),Vd=r(ko,"P",{});var v2=s(Vd);S_=i(v2,"Example of multi-label classification:"),v2.forEach(o),W_=d(ko),v(ms.$$.fragment,ko),ko.forEach(o),dr.forEach(o),Sm=d(t),Et=r(t,"H2",{class:!0});var Ih=s(Et);bn=r(Ih,"A",{id:!0,class:!0,href:!0});var y2=s(bn);Jd=r(y2,"SPAN",{});var T2=s(Jd);v(hs.$$.fragment,T2),T2.forEach(o),y2.forEach(o),U_=d(Ih),Kd=r(Ih,"SPAN",{});var w2=s(Kd);B_=i(w2,"RoFormerForMultipleChoice"),w2.forEach(o),Ih.forEach(o),Wm=d(t),Ro=r(t,"DIV",{class:!0});var cr=s(Ro);v(fs.$$.fragment,cr),H_=d(cr),Gd=r(cr,"P",{});var b2=s(Gd);Q_=i(b2,`RoFormer 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.`),b2.forEach(o),V_=d(cr),us=r(cr,"P",{});var Dh=s(us);J_=i(Dh,"This model is a PyTorch "),gs=r(Dh,"A",{href:!0,rel:!0});var $2=s(gs);K_=i($2,"torch.nn.Module"),$2.forEach(o),G_=i(Dh,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Dh.forEach(o),X_=d(cr),eo=r(cr,"DIV",{class:!0});var et=s(eo);v(_s.$$.fragment,et),Y_=d(et),zt=r(et,"P",{});var Ol=s(zt);Z_=i(Ol,"The "),al=r(Ol,"A",{href:!0});var R2=s(al);ek=i(R2,"RoFormerForMultipleChoice"),R2.forEach(o),ok=i(Ol," forward method, overrides the "),Xd=r(Ol,"CODE",{});var M2=s(Xd);tk=i(M2,"__call__"),M2.forEach(o),nk=i(Ol," special method."),Ol.forEach(o),rk=d(et),v($n.$$.fragment,et),sk=d(et),Yd=r(et,"P",{});var x2=s(Yd);ak=i(x2,"Example:"),x2.forEach(o),ik=d(et),v(ks.$$.fragment,et),et.forEach(o),cr.forEach(o),Um=d(t),jt=r(t,"H2",{class:!0});var Nh=s(jt);Rn=r(Nh,"A",{id:!0,class:!0,href:!0});var E2=s(Rn);Zd=r(E2,"SPAN",{});var z2=s(Zd);v(Fs.$$.fragment,z2),z2.forEach(o),E2.forEach(o),lk=d(Nh),ec=r(Nh,"SPAN",{});var j2=s(ec);dk=i(j2,"RoFormerForTokenClassification"),j2.forEach(o),Nh.forEach(o),Bm=d(t),Mo=r(t,"DIV",{class:!0});var pr=s(Mo);v(vs.$$.fragment,pr),ck=d(pr),oc=r(pr,"P",{});var q2=s(oc);pk=i(q2,`RoFormer 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.`),q2.forEach(o),mk=d(pr),ys=r(pr,"P",{});var Oh=s(ys);hk=i(Oh,"This model is a PyTorch "),Ts=r(Oh,"A",{href:!0,rel:!0});var C2=s(Ts);fk=i(C2,"torch.nn.Module"),C2.forEach(o),uk=i(Oh,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Oh.forEach(o),gk=d(pr),oo=r(pr,"DIV",{class:!0});var ot=s(oo);v(ws.$$.fragment,ot),_k=d(ot),qt=r(ot,"P",{});var Sl=s(qt);kk=i(Sl,"The "),il=r(Sl,"A",{href:!0});var P2=s(il);Fk=i(P2,"RoFormerForTokenClassification"),P2.forEach(o),vk=i(Sl," forward method, overrides the "),tc=r(Sl,"CODE",{});var A2=s(tc);yk=i(A2,"__call__"),A2.forEach(o),Tk=i(Sl," special method."),Sl.forEach(o),wk=d(ot),v(Mn.$$.fragment,ot),bk=d(ot),nc=r(ot,"P",{});var L2=s(nc);$k=i(L2,"Example:"),L2.forEach(o),Rk=d(ot),v(bs.$$.fragment,ot),ot.forEach(o),pr.forEach(o),Hm=d(t),Ct=r(t,"H2",{class:!0});var Sh=s(Ct);xn=r(Sh,"A",{id:!0,class:!0,href:!0});var I2=s(xn);rc=r(I2,"SPAN",{});var D2=s(rc);v($s.$$.fragment,D2),D2.forEach(o),I2.forEach(o),Mk=d(Sh),sc=r(Sh,"SPAN",{});var N2=s(sc);xk=i(N2,"RoFormerForQuestionAnswering"),N2.forEach(o),Sh.forEach(o),Qm=d(t),xo=r(t,"DIV",{class:!0});var mr=s(xo);v(Rs.$$.fragment,mr),Ek=d(mr),Pt=r(mr,"P",{});var Wl=s(Pt);zk=i(Wl,`RoFormer 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 `),ac=r(Wl,"CODE",{});var O2=s(ac);jk=i(O2,"span start logits"),O2.forEach(o),qk=i(Wl," and "),ic=r(Wl,"CODE",{});var S2=s(ic);Ck=i(S2,"span end logits"),S2.forEach(o),Pk=i(Wl,")."),Wl.forEach(o),Ak=d(mr),Ms=r(mr,"P",{});var Wh=s(Ms);Lk=i(Wh,"This model is a PyTorch "),xs=r(Wh,"A",{href:!0,rel:!0});var W2=s(xs);Ik=i(W2,"torch.nn.Module"),W2.forEach(o),Dk=i(Wh,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Wh.forEach(o),Nk=d(mr),to=r(mr,"DIV",{class:!0});var tt=s(to);v(Es.$$.fragment,tt),Ok=d(tt),At=r(tt,"P",{});var Ul=s(At);Sk=i(Ul,"The "),ll=r(Ul,"A",{href:!0});var U2=s(ll);Wk=i(U2,"RoFormerForQuestionAnswering"),U2.forEach(o),Uk=i(Ul," forward method, overrides the "),lc=r(Ul,"CODE",{});var B2=s(lc);Bk=i(B2,"__call__"),B2.forEach(o),Hk=i(Ul," special method."),Ul.forEach(o),Qk=d(tt),v(En.$$.fragment,tt),Vk=d(tt),dc=r(tt,"P",{});var H2=s(dc);Jk=i(H2,"Example:"),H2.forEach(o),Kk=d(tt),v(zs.$$.fragment,tt),tt.forEach(o),mr.forEach(o),Vm=d(t),Lt=r(t,"H2",{class:!0});var Uh=s(Lt);zn=r(Uh,"A",{id:!0,class:!0,href:!0});var Q2=s(zn);cc=r(Q2,"SPAN",{});var V2=s(cc);v(js.$$.fragment,V2),V2.forEach(o),Q2.forEach(o),Gk=d(Uh),pc=r(Uh,"SPAN",{});var J2=s(pc);Xk=i(J2,"TFRoFormerModel"),J2.forEach(o),Uh.forEach(o),Jm=d(t),We=r(t,"DIV",{class:!0});var qo=s(We);v(qs.$$.fragment,qo),Yk=d(qo),mc=r(qo,"P",{});var K2=s(mc);Zk=i(K2,"The bare RoFormer Model transformer outputing raw hidden-states without any specific head on top."),K2.forEach(o),eF=d(qo),Cs=r(qo,"P",{});var Bh=s(Cs);oF=i(Bh,"This model inherits from "),dl=r(Bh,"A",{href:!0});var G2=s(dl);tF=i(G2,"TFPreTrainedModel"),G2.forEach(o),nF=i(Bh,`. 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.)`),Bh.forEach(o),rF=d(qo),Ps=r(qo,"P",{});var Hh=s(Ps);sF=i(Hh,"This model is also a "),As=r(Hh,"A",{href:!0,rel:!0});var X2=s(As);aF=i(X2,"tf.keras.Model"),X2.forEach(o),iF=i(Hh,` 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.`),Hh.forEach(o),lF=d(qo),v(jn.$$.fragment,qo),dF=d(qo),no=r(qo,"DIV",{class:!0});var nt=s(no);v(Ls.$$.fragment,nt),cF=d(nt),It=r(nt,"P",{});var Bl=s(It);pF=i(Bl,"The "),cl=r(Bl,"A",{href:!0});var Y2=s(cl);mF=i(Y2,"TFRoFormerModel"),Y2.forEach(o),hF=i(Bl," forward method, overrides the "),hc=r(Bl,"CODE",{});var Z2=s(hc);fF=i(Z2,"__call__"),Z2.forEach(o),uF=i(Bl," special method."),Bl.forEach(o),gF=d(nt),v(qn.$$.fragment,nt),_F=d(nt),fc=r(nt,"P",{});var e0=s(fc);kF=i(e0,"Example:"),e0.forEach(o),FF=d(nt),v(Is.$$.fragment,nt),nt.forEach(o),qo.forEach(o),Km=d(t),Dt=r(t,"H2",{class:!0});var Qh=s(Dt);Cn=r(Qh,"A",{id:!0,class:!0,href:!0});var o0=s(Cn);uc=r(o0,"SPAN",{});var t0=s(uc);v(Ds.$$.fragment,t0),t0.forEach(o),o0.forEach(o),vF=d(Qh),gc=r(Qh,"SPAN",{});var n0=s(gc);yF=i(n0,"TFRoFormerForMaskedLM"),n0.forEach(o),Qh.forEach(o),Gm=d(t),Ue=r(t,"DIV",{class:!0});var Co=s(Ue);v(Ns.$$.fragment,Co),TF=d(Co),Os=r(Co,"P",{});var Vh=s(Os);wF=i(Vh,"RoFormer Model with a "),_c=r(Vh,"CODE",{});var r0=s(_c);bF=i(r0,"language modeling"),r0.forEach(o),$F=i(Vh," head on top."),Vh.forEach(o),RF=d(Co),Ss=r(Co,"P",{});var Jh=s(Ss);MF=i(Jh,"This model inherits from "),pl=r(Jh,"A",{href:!0});var s0=s(pl);xF=i(s0,"TFPreTrainedModel"),s0.forEach(o),EF=i(Jh,`. 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.)`),Jh.forEach(o),zF=d(Co),Ws=r(Co,"P",{});var Kh=s(Ws);jF=i(Kh,"This model is also a "),Us=r(Kh,"A",{href:!0,rel:!0});var a0=s(Us);qF=i(a0,"tf.keras.Model"),a0.forEach(o),CF=i(Kh,` 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.`),Kh.forEach(o),PF=d(Co),v(Pn.$$.fragment,Co),AF=d(Co),ro=r(Co,"DIV",{class:!0});var rt=s(ro);v(Bs.$$.fragment,rt),LF=d(rt),Nt=r(rt,"P",{});var Hl=s(Nt);IF=i(Hl,"The "),ml=r(Hl,"A",{href:!0});var i0=s(ml);DF=i(i0,"TFRoFormerForMaskedLM"),i0.forEach(o),NF=i(Hl," forward method, overrides the "),kc=r(Hl,"CODE",{});var l0=s(kc);OF=i(l0,"__call__"),l0.forEach(o),SF=i(Hl," special method."),Hl.forEach(o),WF=d(rt),v(An.$$.fragment,rt),UF=d(rt),Fc=r(rt,"P",{});var d0=s(Fc);BF=i(d0,"Example:"),d0.forEach(o),HF=d(rt),v(Hs.$$.fragment,rt),rt.forEach(o),Co.forEach(o),Xm=d(t),Ot=r(t,"H2",{class:!0});var Gh=s(Ot);Ln=r(Gh,"A",{id:!0,class:!0,href:!0});var c0=s(Ln);vc=r(c0,"SPAN",{});var p0=s(vc);v(Qs.$$.fragment,p0),p0.forEach(o),c0.forEach(o),QF=d(Gh),yc=r(Gh,"SPAN",{});var m0=s(yc);VF=i(m0,"TFRoFormerForCausalLM"),m0.forEach(o),Gh.forEach(o),Ym=d(t),Be=r(t,"DIV",{class:!0});var Po=s(Be);v(Vs.$$.fragment,Po),JF=d(Po),Js=r(Po,"P",{});var Xh=s(Js);KF=i(Xh,"RoFormer Model with a "),Tc=r(Xh,"CODE",{});var h0=s(Tc);GF=i(h0,"language modeling"),h0.forEach(o),XF=i(Xh," head on top for CLM fine-tuning."),Xh.forEach(o),YF=d(Po),Ks=r(Po,"P",{});var Yh=s(Ks);ZF=i(Yh,"This model inherits from "),hl=r(Yh,"A",{href:!0});var f0=s(hl);ev=i(f0,"TFPreTrainedModel"),f0.forEach(o),ov=i(Yh,`. 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.)`),Yh.forEach(o),tv=d(Po),Gs=r(Po,"P",{});var Zh=s(Gs);nv=i(Zh,"This model is also a "),Xs=r(Zh,"A",{href:!0,rel:!0});var u0=s(Xs);rv=i(u0,"tf.keras.Model"),u0.forEach(o),sv=i(Zh,` 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.`),Zh.forEach(o),av=d(Po),v(In.$$.fragment,Po),iv=d(Po),jo=r(Po,"DIV",{class:!0});var hr=s(jo);v(Ys.$$.fragment,hr),lv=d(hr),Ge=r(hr,"P",{});var Ao=s(Ge);dv=i(Ao,"labels ("),wc=r(Ao,"CODE",{});var g0=s(wc);cv=i(g0,"tf.Tensor"),g0.forEach(o),pv=i(Ao," or "),bc=r(Ao,"CODE",{});var _0=s(bc);mv=i(_0,"np.ndarray"),_0.forEach(o),hv=i(Ao," of shape "),$c=r(Ao,"CODE",{});var k0=s($c);fv=i(k0,"(batch_size, sequence_length)"),k0.forEach(o),uv=i(Ao,", "),Rc=r(Ao,"EM",{});var F0=s(Rc);gv=i(F0,"optional"),F0.forEach(o),_v=i(Ao,`):
Labels for computing the cross entropy classification loss. Indices should be in `),Mc=r(Ao,"CODE",{});var v0=s(Mc);kv=i(v0,"[0, ..., config.vocab_size - 1]"),v0.forEach(o),Fv=i(Ao,"."),Ao.forEach(o),vv=d(hr),xc=r(hr,"P",{});var y0=s(xc);yv=i(y0,"Example:"),y0.forEach(o),Tv=d(hr),v(Zs.$$.fragment,hr),hr.forEach(o),Po.forEach(o),Zm=d(t),St=r(t,"H2",{class:!0});var ef=s(St);Dn=r(ef,"A",{id:!0,class:!0,href:!0});var T0=s(Dn);Ec=r(T0,"SPAN",{});var w0=s(Ec);v(ea.$$.fragment,w0),w0.forEach(o),T0.forEach(o),wv=d(ef),zc=r(ef,"SPAN",{});var b0=s(zc);bv=i(b0,"TFRoFormerForSequenceClassification"),b0.forEach(o),ef.forEach(o),eh=d(t),He=r(t,"DIV",{class:!0});var Lo=s(He);v(oa.$$.fragment,Lo),$v=d(Lo),jc=r(Lo,"P",{});var $0=s(jc);Rv=i($0,"RoFormer Model transformer with a sequence classification/regression head on top e.g., for GLUE tasks."),$0.forEach(o),Mv=d(Lo),ta=r(Lo,"P",{});var of=s(ta);xv=i(of,"This model inherits from "),fl=r(of,"A",{href:!0});var R0=s(fl);Ev=i(R0,"TFPreTrainedModel"),R0.forEach(o),zv=i(of,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),of.forEach(o),jv=d(Lo),na=r(Lo,"P",{});var tf=s(na);qv=i(tf,"This model is also a "),ra=r(tf,"A",{href:!0,rel:!0});var M0=s(ra);Cv=i(M0,"tf.keras.Model"),M0.forEach(o),Pv=i(tf,` 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.`),tf.forEach(o),Av=d(Lo),v(Nn.$$.fragment,Lo),Lv=d(Lo),so=r(Lo,"DIV",{class:!0});var st=s(so);v(sa.$$.fragment,st),Iv=d(st),Wt=r(st,"P",{});var Ql=s(Wt);Dv=i(Ql,"The "),ul=r(Ql,"A",{href:!0});var x0=s(ul);Nv=i(x0,"TFRoFormerForSequenceClassification"),x0.forEach(o),Ov=i(Ql," forward method, overrides the "),qc=r(Ql,"CODE",{});var E0=s(qc);Sv=i(E0,"__call__"),E0.forEach(o),Wv=i(Ql," special method."),Ql.forEach(o),Uv=d(st),v(On.$$.fragment,st),Bv=d(st),Cc=r(st,"P",{});var z0=s(Cc);Hv=i(z0,"Example:"),z0.forEach(o),Qv=d(st),v(aa.$$.fragment,st),st.forEach(o),Lo.forEach(o),oh=d(t),Ut=r(t,"H2",{class:!0});var nf=s(Ut);Sn=r(nf,"A",{id:!0,class:!0,href:!0});var j0=s(Sn);Pc=r(j0,"SPAN",{});var q0=s(Pc);v(ia.$$.fragment,q0),q0.forEach(o),j0.forEach(o),Vv=d(nf),Ac=r(nf,"SPAN",{});var C0=s(Ac);Jv=i(C0,"TFRoFormerForMultipleChoice"),C0.forEach(o),nf.forEach(o),th=d(t),Qe=r(t,"DIV",{class:!0});var Io=s(Qe);v(la.$$.fragment,Io),Kv=d(Io),Lc=r(Io,"P",{});var P0=s(Lc);Gv=i(P0,`RoFormer 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.`),P0.forEach(o),Xv=d(Io),da=r(Io,"P",{});var rf=s(da);Yv=i(rf,"This model inherits from "),gl=r(rf,"A",{href:!0});var A0=s(gl);Zv=i(A0,"TFPreTrainedModel"),A0.forEach(o),ey=i(rf,`. 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.)`),rf.forEach(o),oy=d(Io),ca=r(Io,"P",{});var sf=s(ca);ty=i(sf,"This model is also a "),pa=r(sf,"A",{href:!0,rel:!0});var L0=s(pa);ny=i(L0,"tf.keras.Model"),L0.forEach(o),ry=i(sf,` 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.`),sf.forEach(o),sy=d(Io),v(Wn.$$.fragment,Io),ay=d(Io),ao=r(Io,"DIV",{class:!0});var at=s(ao);v(ma.$$.fragment,at),iy=d(at),Bt=r(at,"P",{});var Vl=s(Bt);ly=i(Vl,"The "),_l=r(Vl,"A",{href:!0});var I0=s(_l);dy=i(I0,"TFRoFormerForMultipleChoice"),I0.forEach(o),cy=i(Vl," forward method, overrides the "),Ic=r(Vl,"CODE",{});var D0=s(Ic);py=i(D0,"__call__"),D0.forEach(o),my=i(Vl," special method."),Vl.forEach(o),hy=d(at),v(Un.$$.fragment,at),fy=d(at),Dc=r(at,"P",{});var N0=s(Dc);uy=i(N0,"Example:"),N0.forEach(o),gy=d(at),v(ha.$$.fragment,at),at.forEach(o),Io.forEach(o),nh=d(t),Ht=r(t,"H2",{class:!0});var af=s(Ht);Bn=r(af,"A",{id:!0,class:!0,href:!0});var O0=s(Bn);Nc=r(O0,"SPAN",{});var S0=s(Nc);v(fa.$$.fragment,S0),S0.forEach(o),O0.forEach(o),_y=d(af),Oc=r(af,"SPAN",{});var W0=s(Oc);ky=i(W0,"TFRoFormerForTokenClassification"),W0.forEach(o),af.forEach(o),rh=d(t),Ve=r(t,"DIV",{class:!0});var Do=s(Ve);v(ua.$$.fragment,Do),Fy=d(Do),Sc=r(Do,"P",{});var U0=s(Sc);vy=i(U0,`RoFormer 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.`),U0.forEach(o),yy=d(Do),ga=r(Do,"P",{});var lf=s(ga);Ty=i(lf,"This model inherits from "),kl=r(lf,"A",{href:!0});var B0=s(kl);wy=i(B0,"TFPreTrainedModel"),B0.forEach(o),by=i(lf,`. 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.)`),lf.forEach(o),$y=d(Do),_a=r(Do,"P",{});var df=s(_a);Ry=i(df,"This model is also a "),ka=r(df,"A",{href:!0,rel:!0});var H0=s(ka);My=i(H0,"tf.keras.Model"),H0.forEach(o),xy=i(df,` 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.`),df.forEach(o),Ey=d(Do),v(Hn.$$.fragment,Do),zy=d(Do),io=r(Do,"DIV",{class:!0});var it=s(io);v(Fa.$$.fragment,it),jy=d(it),Qt=r(it,"P",{});var Jl=s(Qt);qy=i(Jl,"The "),Fl=r(Jl,"A",{href:!0});var Q0=s(Fl);Cy=i(Q0,"TFRoFormerForTokenClassification"),Q0.forEach(o),Py=i(Jl," forward method, overrides the "),Wc=r(Jl,"CODE",{});var V0=s(Wc);Ay=i(V0,"__call__"),V0.forEach(o),Ly=i(Jl," special method."),Jl.forEach(o),Iy=d(it),v(Qn.$$.fragment,it),Dy=d(it),Uc=r(it,"P",{});var J0=s(Uc);Ny=i(J0,"Example:"),J0.forEach(o),Oy=d(it),v(va.$$.fragment,it),it.forEach(o),Do.forEach(o),sh=d(t),Vt=r(t,"H2",{class:!0});var cf=s(Vt);Vn=r(cf,"A",{id:!0,class:!0,href:!0});var K0=s(Vn);Bc=r(K0,"SPAN",{});var G0=s(Bc);v(ya.$$.fragment,G0),G0.forEach(o),K0.forEach(o),Sy=d(cf),Hc=r(cf,"SPAN",{});var X0=s(Hc);Wy=i(X0,"TFRoFormerForQuestionAnswering"),X0.forEach(o),cf.forEach(o),ah=d(t),Je=r(t,"DIV",{class:!0});var No=s(Je);v(Ta.$$.fragment,No),Uy=d(No),Jt=r(No,"P",{});var Kl=s(Jt);By=i(Kl,`RoFormer 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 `),Qc=r(Kl,"CODE",{});var Y0=s(Qc);Hy=i(Y0,"span start logits"),Y0.forEach(o),Qy=i(Kl," and "),Vc=r(Kl,"CODE",{});var Z0=s(Vc);Vy=i(Z0,"span end logits"),Z0.forEach(o),Jy=i(Kl,")."),Kl.forEach(o),Ky=d(No),wa=r(No,"P",{});var pf=s(wa);Gy=i(pf,"This model inherits from "),vl=r(pf,"A",{href:!0});var eR=s(vl);Xy=i(eR,"TFPreTrainedModel"),eR.forEach(o),Yy=i(pf,`. 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.)`),pf.forEach(o),Zy=d(No),ba=r(No,"P",{});var mf=s(ba);eT=i(mf,"This model is also a "),$a=r(mf,"A",{href:!0,rel:!0});var oR=s($a);oT=i(oR,"tf.keras.Model"),oR.forEach(o),tT=i(mf,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),mf.forEach(o),nT=d(No),v(Jn.$$.fragment,No),rT=d(No),lo=r(No,"DIV",{class:!0});var lt=s(lo);v(Ra.$$.fragment,lt),sT=d(lt),Kt=r(lt,"P",{});var Gl=s(Kt);aT=i(Gl,"The "),yl=r(Gl,"A",{href:!0});var tR=s(yl);iT=i(tR,"TFRoFormerForQuestionAnswering"),tR.forEach(o),lT=i(Gl," forward method, overrides the "),Jc=r(Gl,"CODE",{});var nR=s(Jc);dT=i(nR,"__call__"),nR.forEach(o),cT=i(Gl," special method."),Gl.forEach(o),pT=d(lt),v(Kn.$$.fragment,lt),mT=d(lt),Kc=r(lt,"P",{});var rR=s(Kc);hT=i(rR,"Example:"),rR.forEach(o),fT=d(lt),v(Ma.$$.fragment,lt),lt.forEach(o),No.forEach(o),ih=d(t),Gt=r(t,"H2",{class:!0});var hf=s(Gt);Gn=r(hf,"A",{id:!0,class:!0,href:!0});var sR=s(Gn);Gc=r(sR,"SPAN",{});var aR=s(Gc);v(xa.$$.fragment,aR),aR.forEach(o),sR.forEach(o),uT=d(hf),Xc=r(hf,"SPAN",{});var iR=s(Xc);gT=i(iR,"FlaxRoFormerModel"),iR.forEach(o),hf.forEach(o),lh=d(t),Ce=r(t,"DIV",{class:!0});var Fo=s(Ce);v(Ea.$$.fragment,Fo),_T=d(Fo),Yc=r(Fo,"P",{});var lR=s(Yc);kT=i(lR,"The bare RoFormer Model transformer outputting raw hidden-states without any specific head on top."),lR.forEach(o),FT=d(Fo),za=r(Fo,"P",{});var ff=s(za);vT=i(ff,"This model inherits from "),Tl=r(ff,"A",{href:!0});var dR=s(Tl);yT=i(dR,"FlaxPreTrainedModel"),dR.forEach(o),TT=i(ff,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),ff.forEach(o),wT=d(Fo),ja=r(Fo,"P",{});var uf=s(ja);bT=i(uf,"This model is also a Flax Linen "),qa=r(uf,"A",{href:!0,rel:!0});var cR=s(qa);$T=i(cR,"flax.linen.Module"),cR.forEach(o),RT=i(uf,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),uf.forEach(o),MT=d(Fo),Zc=r(Fo,"P",{});var pR=s(Zc);xT=i(pR,"Finally, this model supports inherent JAX features such as:"),pR.forEach(o),ET=d(Fo),Wo=r(Fo,"UL",{});var fr=s(Wo);ep=r(fr,"LI",{});var mR=s(ep);Ca=r(mR,"A",{href:!0,rel:!0});var hR=s(Ca);zT=i(hR,"Just-In-Time (JIT) compilation"),hR.forEach(o),mR.forEach(o),jT=d(fr),op=r(fr,"LI",{});var fR=s(op);Pa=r(fR,"A",{href:!0,rel:!0});var uR=s(Pa);qT=i(uR,"Automatic Differentiation"),uR.forEach(o),fR.forEach(o),CT=d(fr),tp=r(fr,"LI",{});var gR=s(tp);Aa=r(gR,"A",{href:!0,rel:!0});var _R=s(Aa);PT=i(_R,"Vectorization"),_R.forEach(o),gR.forEach(o),AT=d(fr),np=r(fr,"LI",{});var kR=s(np);La=r(kR,"A",{href:!0,rel:!0});var FR=s(La);LT=i(FR,"Parallelization"),FR.forEach(o),kR.forEach(o),fr.forEach(o),IT=d(Fo),co=r(Fo,"DIV",{class:!0});var dt=s(co);v(Ia.$$.fragment,dt),DT=d(dt),Xt=r(dt,"P",{});var Xl=s(Xt);NT=i(Xl,"The "),rp=r(Xl,"CODE",{});var vR=s(rp);OT=i(vR,"FlaxRoFormerPreTrainedModel"),vR.forEach(o),ST=i(Xl,"forward method, overrides the "),sp=r(Xl,"CODE",{});var yR=s(sp);WT=i(yR,"__call__"),yR.forEach(o),UT=i(Xl," special method."),Xl.forEach(o),BT=d(dt),v(Xn.$$.fragment,dt),HT=d(dt),ap=r(dt,"P",{});var TR=s(ap);QT=i(TR,"Example:"),TR.forEach(o),VT=d(dt),v(Da.$$.fragment,dt),dt.forEach(o),Fo.forEach(o),dh=d(t),Yt=r(t,"H2",{class:!0});var gf=s(Yt);Yn=r(gf,"A",{id:!0,class:!0,href:!0});var wR=s(Yn);ip=r(wR,"SPAN",{});var bR=s(ip);v(Na.$$.fragment,bR),bR.forEach(o),wR.forEach(o),JT=d(gf),lp=r(gf,"SPAN",{});var $R=s(lp);KT=i($R,"FlaxRoFormerForMaskedLM"),$R.forEach(o),gf.forEach(o),ch=d(t),Pe=r(t,"DIV",{class:!0});var vo=s(Pe);v(Oa.$$.fragment,vo),GT=d(vo),Sa=r(vo,"P",{});var _f=s(Sa);XT=i(_f,"RoFormer Model with a "),dp=r(_f,"CODE",{});var RR=s(dp);YT=i(RR,"language modeling"),RR.forEach(o),ZT=i(_f," head on top."),_f.forEach(o),e1=d(vo),Wa=r(vo,"P",{});var kf=s(Wa);o1=i(kf,"This model inherits from "),wl=r(kf,"A",{href:!0});var MR=s(wl);t1=i(MR,"FlaxPreTrainedModel"),MR.forEach(o),n1=i(kf,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),kf.forEach(o),r1=d(vo),Ua=r(vo,"P",{});var Ff=s(Ua);s1=i(Ff,"This model is also a Flax Linen "),Ba=r(Ff,"A",{href:!0,rel:!0});var xR=s(Ba);a1=i(xR,"flax.linen.Module"),xR.forEach(o),i1=i(Ff,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Ff.forEach(o),l1=d(vo),cp=r(vo,"P",{});var ER=s(cp);d1=i(ER,"Finally, this model supports inherent JAX features such as:"),ER.forEach(o),c1=d(vo),Uo=r(vo,"UL",{});var ur=s(Uo);pp=r(ur,"LI",{});var zR=s(pp);Ha=r(zR,"A",{href:!0,rel:!0});var jR=s(Ha);p1=i(jR,"Just-In-Time (JIT) compilation"),jR.forEach(o),zR.forEach(o),m1=d(ur),mp=r(ur,"LI",{});var qR=s(mp);Qa=r(qR,"A",{href:!0,rel:!0});var CR=s(Qa);h1=i(CR,"Automatic Differentiation"),CR.forEach(o),qR.forEach(o),f1=d(ur),hp=r(ur,"LI",{});var PR=s(hp);Va=r(PR,"A",{href:!0,rel:!0});var AR=s(Va);u1=i(AR,"Vectorization"),AR.forEach(o),PR.forEach(o),g1=d(ur),fp=r(ur,"LI",{});var LR=s(fp);Ja=r(LR,"A",{href:!0,rel:!0});var IR=s(Ja);_1=i(IR,"Parallelization"),IR.forEach(o),LR.forEach(o),ur.forEach(o),k1=d(vo),po=r(vo,"DIV",{class:!0});var ct=s(po);v(Ka.$$.fragment,ct),F1=d(ct),Zt=r(ct,"P",{});var Yl=s(Zt);v1=i(Yl,"The "),up=r(Yl,"CODE",{});var DR=s(up);y1=i(DR,"FlaxRoFormerPreTrainedModel"),DR.forEach(o),T1=i(Yl,"forward method, overrides the "),gp=r(Yl,"CODE",{});var NR=s(gp);w1=i(NR,"__call__"),NR.forEach(o),b1=i(Yl," special method."),Yl.forEach(o),$1=d(ct),v(Zn.$$.fragment,ct),R1=d(ct),_p=r(ct,"P",{});var OR=s(_p);M1=i(OR,"Example:"),OR.forEach(o),x1=d(ct),v(Ga.$$.fragment,ct),ct.forEach(o),vo.forEach(o),ph=d(t),en=r(t,"H2",{class:!0});var vf=s(en);er=r(vf,"A",{id:!0,class:!0,href:!0});var SR=s(er);kp=r(SR,"SPAN",{});var WR=s(kp);v(Xa.$$.fragment,WR),WR.forEach(o),SR.forEach(o),E1=d(vf),Fp=r(vf,"SPAN",{});var UR=s(Fp);z1=i(UR,"FlaxRoFormerForSequenceClassification"),UR.forEach(o),vf.forEach(o),mh=d(t),Ae=r(t,"DIV",{class:!0});var yo=s(Ae);v(Ya.$$.fragment,yo),j1=d(yo),vp=r(yo,"P",{});var BR=s(vp);q1=i(BR,`RoFormer Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),BR.forEach(o),C1=d(yo),Za=r(yo,"P",{});var yf=s(Za);P1=i(yf,"This model inherits from "),bl=r(yf,"A",{href:!0});var HR=s(bl);A1=i(HR,"FlaxPreTrainedModel"),HR.forEach(o),L1=i(yf,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),yf.forEach(o),I1=d(yo),ei=r(yo,"P",{});var Tf=s(ei);D1=i(Tf,"This model is also a Flax Linen "),oi=r(Tf,"A",{href:!0,rel:!0});var QR=s(oi);N1=i(QR,"flax.linen.Module"),QR.forEach(o),O1=i(Tf,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Tf.forEach(o),S1=d(yo),yp=r(yo,"P",{});var VR=s(yp);W1=i(VR,"Finally, this model supports inherent JAX features such as:"),VR.forEach(o),U1=d(yo),Bo=r(yo,"UL",{});var gr=s(Bo);Tp=r(gr,"LI",{});var JR=s(Tp);ti=r(JR,"A",{href:!0,rel:!0});var KR=s(ti);B1=i(KR,"Just-In-Time (JIT) compilation"),KR.forEach(o),JR.forEach(o),H1=d(gr),wp=r(gr,"LI",{});var GR=s(wp);ni=r(GR,"A",{href:!0,rel:!0});var XR=s(ni);Q1=i(XR,"Automatic Differentiation"),XR.forEach(o),GR.forEach(o),V1=d(gr),bp=r(gr,"LI",{});var YR=s(bp);ri=r(YR,"A",{href:!0,rel:!0});var ZR=s(ri);J1=i(ZR,"Vectorization"),ZR.forEach(o),YR.forEach(o),K1=d(gr),$p=r(gr,"LI",{});var eM=s($p);si=r(eM,"A",{href:!0,rel:!0});var oM=s(si);G1=i(oM,"Parallelization"),oM.forEach(o),eM.forEach(o),gr.forEach(o),X1=d(yo),mo=r(yo,"DIV",{class:!0});var pt=s(mo);v(ai.$$.fragment,pt),Y1=d(pt),on=r(pt,"P",{});var Zl=s(on);Z1=i(Zl,"The "),Rp=r(Zl,"CODE",{});var tM=s(Rp);ew=i(tM,"FlaxRoFormerPreTrainedModel"),tM.forEach(o),ow=i(Zl,"forward method, overrides the "),Mp=r(Zl,"CODE",{});var nM=s(Mp);tw=i(nM,"__call__"),nM.forEach(o),nw=i(Zl," special method."),Zl.forEach(o),rw=d(pt),v(or.$$.fragment,pt),sw=d(pt),xp=r(pt,"P",{});var rM=s(xp);aw=i(rM,"Example:"),rM.forEach(o),iw=d(pt),v(ii.$$.fragment,pt),pt.forEach(o),yo.forEach(o),hh=d(t),tn=r(t,"H2",{class:!0});var wf=s(tn);tr=r(wf,"A",{id:!0,class:!0,href:!0});var sM=s(tr);Ep=r(sM,"SPAN",{});var aM=s(Ep);v(li.$$.fragment,aM),aM.forEach(o),sM.forEach(o),lw=d(wf),zp=r(wf,"SPAN",{});var iM=s(zp);dw=i(iM,"FlaxRoFormerForMultipleChoice"),iM.forEach(o),wf.forEach(o),fh=d(t),Le=r(t,"DIV",{class:!0});var To=s(Le);v(di.$$.fragment,To),cw=d(To),jp=r(To,"P",{});var lM=s(jp);pw=i(lM,`RoFormer 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.`),lM.forEach(o),mw=d(To),ci=r(To,"P",{});var bf=s(ci);hw=i(bf,"This model inherits from "),$l=r(bf,"A",{href:!0});var dM=s($l);fw=i(dM,"FlaxPreTrainedModel"),dM.forEach(o),uw=i(bf,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),bf.forEach(o),gw=d(To),pi=r(To,"P",{});var $f=s(pi);_w=i($f,"This model is also a Flax Linen "),mi=r($f,"A",{href:!0,rel:!0});var cM=s(mi);kw=i(cM,"flax.linen.Module"),cM.forEach(o),Fw=i($f,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),$f.forEach(o),vw=d(To),qp=r(To,"P",{});var pM=s(qp);yw=i(pM,"Finally, this model supports inherent JAX features such as:"),pM.forEach(o),Tw=d(To),Ho=r(To,"UL",{});var _r=s(Ho);Cp=r(_r,"LI",{});var mM=s(Cp);hi=r(mM,"A",{href:!0,rel:!0});var hM=s(hi);ww=i(hM,"Just-In-Time (JIT) compilation"),hM.forEach(o),mM.forEach(o),bw=d(_r),Pp=r(_r,"LI",{});var fM=s(Pp);fi=r(fM,"A",{href:!0,rel:!0});var uM=s(fi);$w=i(uM,"Automatic Differentiation"),uM.forEach(o),fM.forEach(o),Rw=d(_r),Ap=r(_r,"LI",{});var gM=s(Ap);ui=r(gM,"A",{href:!0,rel:!0});var _M=s(ui);Mw=i(_M,"Vectorization"),_M.forEach(o),gM.forEach(o),xw=d(_r),Lp=r(_r,"LI",{});var kM=s(Lp);gi=r(kM,"A",{href:!0,rel:!0});var FM=s(gi);Ew=i(FM,"Parallelization"),FM.forEach(o),kM.forEach(o),_r.forEach(o),zw=d(To),ho=r(To,"DIV",{class:!0});var mt=s(ho);v(_i.$$.fragment,mt),jw=d(mt),nn=r(mt,"P",{});var ed=s(nn);qw=i(ed,"The "),Ip=r(ed,"CODE",{});var vM=s(Ip);Cw=i(vM,"FlaxRoFormerPreTrainedModel"),vM.forEach(o),Pw=i(ed,"forward method, overrides the "),Dp=r(ed,"CODE",{});var yM=s(Dp);Aw=i(yM,"__call__"),yM.forEach(o),Lw=i(ed," special method."),ed.forEach(o),Iw=d(mt),v(nr.$$.fragment,mt),Dw=d(mt),Np=r(mt,"P",{});var TM=s(Np);Nw=i(TM,"Example:"),TM.forEach(o),Ow=d(mt),v(ki.$$.fragment,mt),mt.forEach(o),To.forEach(o),uh=d(t),rn=r(t,"H2",{class:!0});var Rf=s(rn);rr=r(Rf,"A",{id:!0,class:!0,href:!0});var wM=s(rr);Op=r(wM,"SPAN",{});var bM=s(Op);v(Fi.$$.fragment,bM),bM.forEach(o),wM.forEach(o),Sw=d(Rf),Sp=r(Rf,"SPAN",{});var $M=s(Sp);Ww=i($M,"FlaxRoFormerForTokenClassification"),$M.forEach(o),Rf.forEach(o),gh=d(t),Ie=r(t,"DIV",{class:!0});var wo=s(Ie);v(vi.$$.fragment,wo),Uw=d(wo),Wp=r(wo,"P",{});var RM=s(Wp);Bw=i(RM,`RoFormer 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.`),RM.forEach(o),Hw=d(wo),yi=r(wo,"P",{});var Mf=s(yi);Qw=i(Mf,"This model inherits from "),Rl=r(Mf,"A",{href:!0});var MM=s(Rl);Vw=i(MM,"FlaxPreTrainedModel"),MM.forEach(o),Jw=i(Mf,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Mf.forEach(o),Kw=d(wo),Ti=r(wo,"P",{});var xf=s(Ti);Gw=i(xf,"This model is also a Flax Linen "),wi=r(xf,"A",{href:!0,rel:!0});var xM=s(wi);Xw=i(xM,"flax.linen.Module"),xM.forEach(o),Yw=i(xf,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),xf.forEach(o),Zw=d(wo),Up=r(wo,"P",{});var EM=s(Up);eb=i(EM,"Finally, this model supports inherent JAX features such as:"),EM.forEach(o),ob=d(wo),Qo=r(wo,"UL",{});var kr=s(Qo);Bp=r(kr,"LI",{});var zM=s(Bp);bi=r(zM,"A",{href:!0,rel:!0});var jM=s(bi);tb=i(jM,"Just-In-Time (JIT) compilation"),jM.forEach(o),zM.forEach(o),nb=d(kr),Hp=r(kr,"LI",{});var qM=s(Hp);$i=r(qM,"A",{href:!0,rel:!0});var CM=s($i);rb=i(CM,"Automatic Differentiation"),CM.forEach(o),qM.forEach(o),sb=d(kr),Qp=r(kr,"LI",{});var PM=s(Qp);Ri=r(PM,"A",{href:!0,rel:!0});var AM=s(Ri);ab=i(AM,"Vectorization"),AM.forEach(o),PM.forEach(o),ib=d(kr),Vp=r(kr,"LI",{});var LM=s(Vp);Mi=r(LM,"A",{href:!0,rel:!0});var IM=s(Mi);lb=i(IM,"Parallelization"),IM.forEach(o),LM.forEach(o),kr.forEach(o),db=d(wo),fo=r(wo,"DIV",{class:!0});var ht=s(fo);v(xi.$$.fragment,ht),cb=d(ht),sn=r(ht,"P",{});var od=s(sn);pb=i(od,"The "),Jp=r(od,"CODE",{});var DM=s(Jp);mb=i(DM,"FlaxRoFormerPreTrainedModel"),DM.forEach(o),hb=i(od,"forward method, overrides the "),Kp=r(od,"CODE",{});var NM=s(Kp);fb=i(NM,"__call__"),NM.forEach(o),ub=i(od," special method."),od.forEach(o),gb=d(ht),v(sr.$$.fragment,ht),_b=d(ht),Gp=r(ht,"P",{});var OM=s(Gp);kb=i(OM,"Example:"),OM.forEach(o),Fb=d(ht),v(Ei.$$.fragment,ht),ht.forEach(o),wo.forEach(o),_h=d(t),an=r(t,"H2",{class:!0});var Ef=s(an);ar=r(Ef,"A",{id:!0,class:!0,href:!0});var SM=s(ar);Xp=r(SM,"SPAN",{});var WM=s(Xp);v(zi.$$.fragment,WM),WM.forEach(o),SM.forEach(o),vb=d(Ef),Yp=r(Ef,"SPAN",{});var UM=s(Yp);yb=i(UM,"FlaxRoFormerForQuestionAnswering"),UM.forEach(o),Ef.forEach(o),kh=d(t),De=r(t,"DIV",{class:!0});var bo=s(De);v(ji.$$.fragment,bo),Tb=d(bo),ln=r(bo,"P",{});var td=s(ln);wb=i(td,`RoFormer 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 `),Zp=r(td,"CODE",{});var BM=s(Zp);bb=i(BM,"span start logits"),BM.forEach(o),$b=i(td," and "),em=r(td,"CODE",{});var HM=s(em);Rb=i(HM,"span end logits"),HM.forEach(o),Mb=i(td,")."),td.forEach(o),xb=d(bo),qi=r(bo,"P",{});var zf=s(qi);Eb=i(zf,"This model inherits from "),Ml=r(zf,"A",{href:!0});var QM=s(Ml);zb=i(QM,"FlaxPreTrainedModel"),QM.forEach(o),jb=i(zf,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),zf.forEach(o),qb=d(bo),Ci=r(bo,"P",{});var jf=s(Ci);Cb=i(jf,"This model is also a Flax Linen "),Pi=r(jf,"A",{href:!0,rel:!0});var VM=s(Pi);Pb=i(VM,"flax.linen.Module"),VM.forEach(o),Ab=i(jf,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),jf.forEach(o),Lb=d(bo),om=r(bo,"P",{});var JM=s(om);Ib=i(JM,"Finally, this model supports inherent JAX features such as:"),JM.forEach(o),Db=d(bo),Vo=r(bo,"UL",{});var Fr=s(Vo);tm=r(Fr,"LI",{});var KM=s(tm);Ai=r(KM,"A",{href:!0,rel:!0});var GM=s(Ai);Nb=i(GM,"Just-In-Time (JIT) compilation"),GM.forEach(o),KM.forEach(o),Ob=d(Fr),nm=r(Fr,"LI",{});var XM=s(nm);Li=r(XM,"A",{href:!0,rel:!0});var YM=s(Li);Sb=i(YM,"Automatic Differentiation"),YM.forEach(o),XM.forEach(o),Wb=d(Fr),rm=r(Fr,"LI",{});var ZM=s(rm);Ii=r(ZM,"A",{href:!0,rel:!0});var ex=s(Ii);Ub=i(ex,"Vectorization"),ex.forEach(o),ZM.forEach(o),Bb=d(Fr),sm=r(Fr,"LI",{});var ox=s(sm);Di=r(ox,"A",{href:!0,rel:!0});var tx=s(Di);Hb=i(tx,"Parallelization"),tx.forEach(o),ox.forEach(o),Fr.forEach(o),Qb=d(bo),uo=r(bo,"DIV",{class:!0});var ft=s(uo);v(Ni.$$.fragment,ft),Vb=d(ft),dn=r(ft,"P",{});var nd=s(dn);Jb=i(nd,"The "),am=r(nd,"CODE",{});var nx=s(am);Kb=i(nx,"FlaxRoFormerPreTrainedModel"),nx.forEach(o),Gb=i(nd,"forward method, overrides the "),im=r(nd,"CODE",{});var rx=s(im);Xb=i(rx,"__call__"),rx.forEach(o),Yb=i(nd," special method."),nd.forEach(o),Zb=d(ft),v(ir.$$.fragment,ft),e$=d(ft),lm=r(ft,"P",{});var sx=s(lm);o$=i(sx,"Example:"),sx.forEach(o),t$=d(ft),v(Oi.$$.fragment,ft),ft.forEach(o),bo.forEach(o),this.h()},h(){c(p,"name","hf:doc:metadata"),c(p,"content",JSON.stringify(Ix)),c(_,"id","roformer"),c(_,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(_,"href","#roformer"),c(g,"class","relative group"),c(Z,"id","overview"),c(Z,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Z,"href","#overview"),c(E,"class","relative group"),c(te,"href","https://arxiv.org/pdf/2104.09864v1.pdf"),c(te,"rel","nofollow"),c(ne,"href","https://huggingface.co/junnyu"),c(ne,"rel","nofollow"),c(m,"href","https://github.com/ZhuiyiTechnology/roformer"),c(m,"rel","nofollow"),c(C,"id","transformers.RoFormerConfig"),c(C,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(C,"href","#transformers.RoFormerConfig"),c(Fe,"class","relative group"),c(Te,"href","/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerModel"),c(vr,"href","https://huggingface.co/junnyu/roformer_chinese_base"),c(vr,"rel","nofollow"),c(Hi,"href","/docs/transformers/pr_15839/en/main_classes/configuration#transformers.PretrainedConfig"),c(Qi,"href","/docs/transformers/pr_15839/en/main_classes/configuration#transformers.PretrainedConfig"),c(ee,"class","docstring"),c(mn,"id","transformers.RoFormerTokenizer"),c(mn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(mn,"href","#transformers.RoFormerTokenizer"),c(gt,"class","relative group"),c($r,"href","https://pypi.org/project/rjieba/"),c($r,"rel","nofollow"),c(Vi,"href","/docs/transformers/pr_15839/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),c(Jo,"class","docstring"),c(hn,"class","docstring"),c(zo,"class","docstring"),c(Gi,"class","docstring"),c(je,"class","docstring"),c(fn,"id","transformers.RoFormerTokenizerFast"),c(fn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(fn,"href","#transformers.RoFormerTokenizerFast"),c(kt,"class","relative group"),c(Xi,"href","/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerTokenizerFast"),c(Yi,"href","/docs/transformers/pr_15839/en/model_doc/bert#transformers.BertTokenizerFast"),c(Zi,"href","/docs/transformers/pr_15839/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),c(Ko,"class","docstring"),c(qe,"class","docstring"),c(gn,"id","transformers.RoFormerModel"),c(gn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(gn,"href","#transformers.RoFormerModel"),c(Ft,"class","relative group"),c(Hr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Hr,"rel","nofollow"),c(Vr,"href","https://arxiv.org/abs/1706.03762"),c(Vr,"rel","nofollow"),c(tl,"href","/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerModel"),c(Xe,"class","docstring"),c(Ke,"class","docstring"),c(kn,"id","transformers.RoFormerForCausalLM"),c(kn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(kn,"href","#transformers.RoFormerForCausalLM"),c(yt,"class","relative group"),c(Yr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Yr,"rel","nofollow"),c(nl,"href","/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerForCausalLM"),c(Ye,"class","docstring"),c(Oo,"class","docstring"),c(vn,"id","transformers.RoFormerForMaskedLM"),c(vn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(vn,"href","#transformers.RoFormerForMaskedLM"),c(bt,"class","relative group"),c(ns,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(ns,"rel","nofollow"),c(rl,"href","/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerForMaskedLM"),c(Ze,"class","docstring"),c(So,"class","docstring"),c(Tn,"id","transformers.RoFormerForSequenceClassification"),c(Tn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Tn,"href","#transformers.RoFormerForSequenceClassification"),c(Mt,"class","relative group"),c(ds,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(ds,"rel","nofollow"),c(sl,"href","/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerForSequenceClassification"),c(Ne,"class","docstring"),c($o,"class","docstring"),c(bn,"id","transformers.RoFormerForMultipleChoice"),c(bn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(bn,"href","#transformers.RoFormerForMultipleChoice"),c(Et,"class","relative group"),c(gs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(gs,"rel","nofollow"),c(al,"href","/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerForMultipleChoice"),c(eo,"class","docstring"),c(Ro,"class","docstring"),c(Rn,"id","transformers.RoFormerForTokenClassification"),c(Rn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Rn,"href","#transformers.RoFormerForTokenClassification"),c(jt,"class","relative group"),c(Ts,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Ts,"rel","nofollow"),c(il,"href","/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerForTokenClassification"),c(oo,"class","docstring"),c(Mo,"class","docstring"),c(xn,"id","transformers.RoFormerForQuestionAnswering"),c(xn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(xn,"href","#transformers.RoFormerForQuestionAnswering"),c(Ct,"class","relative group"),c(xs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(xs,"rel","nofollow"),c(ll,"href","/docs/transformers/pr_15839/en/model_doc/roformer#transformers.RoFormerForQuestionAnswering"),c(to,"class","docstring"),c(xo,"class","docstring"),c(zn,"id","transformers.TFRoFormerModel"),c(zn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(zn,"href","#transformers.TFRoFormerModel"),c(Lt,"class","relative group"),c(dl,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),c(As,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(As,"rel","nofollow"),c(cl,"href","/docs/transformers/pr_15839/en/model_doc/roformer#transformers.TFRoFormerModel"),c(no,"class","docstring"),c(We,"class","docstring"),c(Cn,"id","transformers.TFRoFormerForMaskedLM"),c(Cn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Cn,"href","#transformers.TFRoFormerForMaskedLM"),c(Dt,"class","relative group"),c(pl,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),c(Us,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Us,"rel","nofollow"),c(ml,"href","/docs/transformers/pr_15839/en/model_doc/roformer#transformers.TFRoFormerForMaskedLM"),c(ro,"class","docstring"),c(Ue,"class","docstring"),c(Ln,"id","transformers.TFRoFormerForCausalLM"),c(Ln,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ln,"href","#transformers.TFRoFormerForCausalLM"),c(Ot,"class","relative group"),c(hl,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),c(Xs,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Xs,"rel","nofollow"),c(jo,"class","docstring"),c(Be,"class","docstring"),c(Dn,"id","transformers.TFRoFormerForSequenceClassification"),c(Dn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Dn,"href","#transformers.TFRoFormerForSequenceClassification"),c(St,"class","relative group"),c(fl,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),c(ra,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(ra,"rel","nofollow"),c(ul,"href","/docs/transformers/pr_15839/en/model_doc/roformer#transformers.TFRoFormerForSequenceClassification"),c(so,"class","docstring"),c(He,"class","docstring"),c(Sn,"id","transformers.TFRoFormerForMultipleChoice"),c(Sn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Sn,"href","#transformers.TFRoFormerForMultipleChoice"),c(Ut,"class","relative group"),c(gl,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),c(pa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(pa,"rel","nofollow"),c(_l,"href","/docs/transformers/pr_15839/en/model_doc/roformer#transformers.TFRoFormerForMultipleChoice"),c(ao,"class","docstring"),c(Qe,"class","docstring"),c(Bn,"id","transformers.TFRoFormerForTokenClassification"),c(Bn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Bn,"href","#transformers.TFRoFormerForTokenClassification"),c(Ht,"class","relative group"),c(kl,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),c(ka,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(ka,"rel","nofollow"),c(Fl,"href","/docs/transformers/pr_15839/en/model_doc/roformer#transformers.TFRoFormerForTokenClassification"),c(io,"class","docstring"),c(Ve,"class","docstring"),c(Vn,"id","transformers.TFRoFormerForQuestionAnswering"),c(Vn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Vn,"href","#transformers.TFRoFormerForQuestionAnswering"),c(Vt,"class","relative group"),c(vl,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),c($a,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c($a,"rel","nofollow"),c(yl,"href","/docs/transformers/pr_15839/en/model_doc/roformer#transformers.TFRoFormerForQuestionAnswering"),c(lo,"class","docstring"),c(Je,"class","docstring"),c(Gn,"id","transformers.FlaxRoFormerModel"),c(Gn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Gn,"href","#transformers.FlaxRoFormerModel"),c(Gt,"class","relative group"),c(Tl,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(qa,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(qa,"rel","nofollow"),c(Ca,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Ca,"rel","nofollow"),c(Pa,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Pa,"rel","nofollow"),c(Aa,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(Aa,"rel","nofollow"),c(La,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(La,"rel","nofollow"),c(co,"class","docstring"),c(Ce,"class","docstring"),c(Yn,"id","transformers.FlaxRoFormerForMaskedLM"),c(Yn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Yn,"href","#transformers.FlaxRoFormerForMaskedLM"),c(Yt,"class","relative group"),c(wl,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(Ba,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(Ba,"rel","nofollow"),c(Ha,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Ha,"rel","nofollow"),c(Qa,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Qa,"rel","nofollow"),c(Va,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(Va,"rel","nofollow"),c(Ja,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(Ja,"rel","nofollow"),c(po,"class","docstring"),c(Pe,"class","docstring"),c(er,"id","transformers.FlaxRoFormerForSequenceClassification"),c(er,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(er,"href","#transformers.FlaxRoFormerForSequenceClassification"),c(en,"class","relative group"),c(bl,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(oi,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(oi,"rel","nofollow"),c(ti,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(ti,"rel","nofollow"),c(ni,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(ni,"rel","nofollow"),c(ri,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(ri,"rel","nofollow"),c(si,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(si,"rel","nofollow"),c(mo,"class","docstring"),c(Ae,"class","docstring"),c(tr,"id","transformers.FlaxRoFormerForMultipleChoice"),c(tr,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(tr,"href","#transformers.FlaxRoFormerForMultipleChoice"),c(tn,"class","relative group"),c($l,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(mi,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(mi,"rel","nofollow"),c(hi,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(hi,"rel","nofollow"),c(fi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(fi,"rel","nofollow"),c(ui,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(ui,"rel","nofollow"),c(gi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(gi,"rel","nofollow"),c(ho,"class","docstring"),c(Le,"class","docstring"),c(rr,"id","transformers.FlaxRoFormerForTokenClassification"),c(rr,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(rr,"href","#transformers.FlaxRoFormerForTokenClassification"),c(rn,"class","relative group"),c(Rl,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(wi,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(wi,"rel","nofollow"),c(bi,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(bi,"rel","nofollow"),c($i,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c($i,"rel","nofollow"),c(Ri,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(Ri,"rel","nofollow"),c(Mi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(Mi,"rel","nofollow"),c(fo,"class","docstring"),c(Ie,"class","docstring"),c(ar,"id","transformers.FlaxRoFormerForQuestionAnswering"),c(ar,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ar,"href","#transformers.FlaxRoFormerForQuestionAnswering"),c(an,"class","relative group"),c(Ml,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(Pi,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(Pi,"rel","nofollow"),c(Ai,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Ai,"rel","nofollow"),c(Li,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Li,"rel","nofollow"),c(Ii,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(Ii,"rel","nofollow"),c(Di,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(Di,"rel","nofollow"),c(uo,"class","docstring"),c(De,"class","docstring")},m(t,u){e(document.head,p),h(t,R,u),h(t,g,u),e(g,_),e(_,$),y(k,$,null),e(g,f),e(g,M),e(M,me),h(t,K,u),h(t,E,u),e(E,Z),e(Z,O),y(oe,O,null),e(E,he),e(E,S),e(S,fe),h(t,le,u),h(t,J,u),e(J,L),e(J,te),e(te,G),e(J,z),h(t,q,u),h(t,re,u),e(re,B),h(t,de,u),h(t,se,u),e(se,W),e(W,ue),h(t,ce,u),h(t,j,u),e(j,ge),h(t,U,u),h(t,ae,u),e(ae,ie),e(ie,H),h(t,pe,u),h(t,X,u),e(X,I),e(X,ne),e(ne,Q),e(X,_e),e(X,m),e(m,x),e(X,Y),h(t,$e,u),h(t,Fe,u),e(Fe,C),e(C,we),y(ye,we,null),e(Fe,Ee),e(Fe,A),e(A,V),h(t,Re,u),h(t,ee,u),y(D,ee,null),e(ee,ze),e(ee,ve),e(ve,ke),e(ve,Te),e(Te,qf),e(ve,Cf),e(ve,vr),e(vr,Pf),e(ve,Af),e(ee,Lf),e(ee,ut),e(ut,If),e(ut,Hi),e(Hi,Df),e(ut,Nf),e(ut,Qi),e(Qi,Of),e(ut,Sf),e(ee,Wf),e(ee,rd),e(rd,Uf),e(ee,Bf),y(yr,ee,null),h(t,Em,u),h(t,gt,u),e(gt,mn),e(mn,sd),y(Tr,sd,null),e(gt,Hf),e(gt,ad),e(ad,Qf),h(t,zm,u),h(t,je,u),y(wr,je,null),e(je,Vf),e(je,br),e(br,Jf),e(br,$r),e($r,Kf),e(br,Gf),e(je,Xf),e(je,Rr),e(Rr,Yf),e(Rr,Vi),e(Vi,Zf),e(Rr,eu),e(je,ou),e(je,id),e(id,tu),e(je,nu),y(Mr,je,null),e(je,ru),e(je,Jo),y(xr,Jo,null),e(Jo,su),e(Jo,ld),e(ld,au),e(Jo,iu),e(Jo,Er),e(Er,Ji),e(Ji,lu),e(Ji,dd),e(dd,du),e(Er,cu),e(Er,Ki),e(Ki,pu),e(Ki,cd),e(cd,mu),e(je,hu),e(je,hn),y(zr,hn,null),e(hn,fu),e(hn,jr),e(jr,uu),e(jr,pd),e(pd,gu),e(jr,_u),e(je,ku),e(je,zo),y(qr,zo,null),e(zo,Fu),e(zo,md),e(md,vu),e(zo,yu),y(Cr,zo,null),e(zo,Tu),e(zo,_t),e(_t,wu),e(_t,hd),e(hd,bu),e(_t,$u),e(_t,fd),e(fd,Ru),e(_t,Mu),e(je,xu),e(je,Gi),y(Pr,Gi,null),h(t,jm,u),h(t,kt,u),e(kt,fn),e(fn,ud),y(Ar,ud,null),e(kt,Eu),e(kt,gd),e(gd,zu),h(t,qm,u),h(t,qe,u),y(Lr,qe,null),e(qe,ju),e(qe,Ir),e(Ir,qu),e(Ir,_d),e(_d,Cu),e(Ir,Pu),e(qe,Au),e(qe,un),e(un,Xi),e(Xi,Lu),e(un,Iu),e(un,Yi),e(Yi,Du),e(un,Nu),e(qe,Ou),e(qe,Dr),e(Dr,Su),e(Dr,Zi),e(Zi,Wu),e(Dr,Uu),e(qe,Bu),e(qe,kd),e(kd,Hu),e(qe,Qu),y(Nr,qe,null),e(qe,Vu),e(qe,Ko),y(Or,Ko,null),e(Ko,Ju),e(Ko,Fd),e(Fd,Ku),e(Ko,Gu),e(Ko,Sr),e(Sr,el),e(el,Xu),e(el,vd),e(vd,Yu),e(Sr,Zu),e(Sr,ol),e(ol,eg),e(ol,yd),e(yd,og),h(t,Cm,u),h(t,Ft,u),e(Ft,gn),e(gn,Td),y(Wr,Td,null),e(Ft,tg),e(Ft,wd),e(wd,ng),h(t,Pm,u),h(t,Ke,u),y(Ur,Ke,null),e(Ke,rg),e(Ke,Br),e(Br,sg),e(Br,Hr),e(Hr,ag),e(Br,ig),e(Ke,lg),e(Ke,Qr),e(Qr,dg),e(Qr,Vr),e(Vr,cg),e(Qr,pg),e(Ke,mg),e(Ke,Se),e(Se,hg),e(Se,bd),e(bd,fg),e(Se,ug),e(Se,$d),e($d,gg),e(Se,_g),e(Se,Rd),e(Rd,kg),e(Se,Fg),e(Se,Md),e(Md,vg),e(Se,yg),e(Se,xd),e(xd,Tg),e(Se,wg),e(Se,Ed),e(Ed,bg),e(Se,$g),e(Ke,Rg),e(Ke,Xe),y(Jr,Xe,null),e(Xe,Mg),e(Xe,vt),e(vt,xg),e(vt,tl),e(tl,Eg),e(vt,zg),e(vt,zd),e(zd,jg),e(vt,qg),e(Xe,Cg),y(_n,Xe,null),e(Xe,Pg),e(Xe,jd),e(jd,Ag),e(Xe,Lg),y(Kr,Xe,null),h(t,Am,u),h(t,yt,u),e(yt,kn),e(kn,qd),y(Gr,qd,null),e(yt,Ig),e(yt,Cd),e(Cd,Dg),h(t,Lm,u),h(t,Oo,u),y(Xr,Oo,null),e(Oo,Ng),e(Oo,Tt),e(Tt,Og),e(Tt,Pd),e(Pd,Sg),e(Tt,Wg),e(Tt,Yr),e(Yr,Ug),e(Tt,Bg),e(Oo,Hg),e(Oo,Ye),y(Zr,Ye,null),e(Ye,Qg),e(Ye,wt),e(wt,Vg),e(wt,nl),e(nl,Jg),e(wt,Kg),e(wt,Ad),e(Ad,Gg),e(wt,Xg),e(Ye,Yg),y(Fn,Ye,null),e(Ye,Zg),e(Ye,Ld),e(Ld,e_),e(Ye,o_),y(es,Ye,null),h(t,Im,u),h(t,bt,u),e(bt,vn),e(vn,Id),y(os,Id,null),e(bt,t_),e(bt,Dd),e(Dd,n_),h(t,Dm,u),h(t,So,u),y(ts,So,null),e(So,r_),e(So,$t),e($t,s_),e($t,Nd),e(Nd,a_),e($t,i_),e($t,ns),e(ns,l_),e($t,d_),e(So,c_),e(So,Ze),y(rs,Ze,null),e(Ze,p_),e(Ze,Rt),e(Rt,m_),e(Rt,rl),e(rl,h_),e(Rt,f_),e(Rt,Od),e(Od,u_),e(Rt,g_),e(Ze,__),y(yn,Ze,null),e(Ze,k_),e(Ze,Sd),e(Sd,F_),e(Ze,v_),y(ss,Ze,null),h(t,Nm,u),h(t,Mt,u),e(Mt,Tn),e(Tn,Wd),y(as,Wd,null),e(Mt,y_),e(Mt,Ud),e(Ud,T_),h(t,Om,u),h(t,$o,u),y(is,$o,null),e($o,w_),e($o,Bd),e(Bd,b_),e($o,$_),e($o,ls),e(ls,R_),e(ls,ds),e(ds,M_),e(ls,x_),e($o,E_),e($o,Ne),y(cs,Ne,null),e(Ne,z_),e(Ne,xt),e(xt,j_),e(xt,sl),e(sl,q_),e(xt,C_),e(xt,Hd),e(Hd,P_),e(xt,A_),e(Ne,L_),y(wn,Ne,null),e(Ne,I_),e(Ne,Qd),e(Qd,D_),e(Ne,N_),y(ps,Ne,null),e(Ne,O_),e(Ne,Vd),e(Vd,S_),e(Ne,W_),y(ms,Ne,null),h(t,Sm,u),h(t,Et,u),e(Et,bn),e(bn,Jd),y(hs,Jd,null),e(Et,U_),e(Et,Kd),e(Kd,B_),h(t,Wm,u),h(t,Ro,u),y(fs,Ro,null),e(Ro,H_),e(Ro,Gd),e(Gd,Q_),e(Ro,V_),e(Ro,us),e(us,J_),e(us,gs),e(gs,K_),e(us,G_),e(Ro,X_),e(Ro,eo),y(_s,eo,null),e(eo,Y_),e(eo,zt),e(zt,Z_),e(zt,al),e(al,ek),e(zt,ok),e(zt,Xd),e(Xd,tk),e(zt,nk),e(eo,rk),y($n,eo,null),e(eo,sk),e(eo,Yd),e(Yd,ak),e(eo,ik),y(ks,eo,null),h(t,Um,u),h(t,jt,u),e(jt,Rn),e(Rn,Zd),y(Fs,Zd,null),e(jt,lk),e(jt,ec),e(ec,dk),h(t,Bm,u),h(t,Mo,u),y(vs,Mo,null),e(Mo,ck),e(Mo,oc),e(oc,pk),e(Mo,mk),e(Mo,ys),e(ys,hk),e(ys,Ts),e(Ts,fk),e(ys,uk),e(Mo,gk),e(Mo,oo),y(ws,oo,null),e(oo,_k),e(oo,qt),e(qt,kk),e(qt,il),e(il,Fk),e(qt,vk),e(qt,tc),e(tc,yk),e(qt,Tk),e(oo,wk),y(Mn,oo,null),e(oo,bk),e(oo,nc),e(nc,$k),e(oo,Rk),y(bs,oo,null),h(t,Hm,u),h(t,Ct,u),e(Ct,xn),e(xn,rc),y($s,rc,null),e(Ct,Mk),e(Ct,sc),e(sc,xk),h(t,Qm,u),h(t,xo,u),y(Rs,xo,null),e(xo,Ek),e(xo,Pt),e(Pt,zk),e(Pt,ac),e(ac,jk),e(Pt,qk),e(Pt,ic),e(ic,Ck),e(Pt,Pk),e(xo,Ak),e(xo,Ms),e(Ms,Lk),e(Ms,xs),e(xs,Ik),e(Ms,Dk),e(xo,Nk),e(xo,to),y(Es,to,null),e(to,Ok),e(to,At),e(At,Sk),e(At,ll),e(ll,Wk),e(At,Uk),e(At,lc),e(lc,Bk),e(At,Hk),e(to,Qk),y(En,to,null),e(to,Vk),e(to,dc),e(dc,Jk),e(to,Kk),y(zs,to,null),h(t,Vm,u),h(t,Lt,u),e(Lt,zn),e(zn,cc),y(js,cc,null),e(Lt,Gk),e(Lt,pc),e(pc,Xk),h(t,Jm,u),h(t,We,u),y(qs,We,null),e(We,Yk),e(We,mc),e(mc,Zk),e(We,eF),e(We,Cs),e(Cs,oF),e(Cs,dl),e(dl,tF),e(Cs,nF),e(We,rF),e(We,Ps),e(Ps,sF),e(Ps,As),e(As,aF),e(Ps,iF),e(We,lF),y(jn,We,null),e(We,dF),e(We,no),y(Ls,no,null),e(no,cF),e(no,It),e(It,pF),e(It,cl),e(cl,mF),e(It,hF),e(It,hc),e(hc,fF),e(It,uF),e(no,gF),y(qn,no,null),e(no,_F),e(no,fc),e(fc,kF),e(no,FF),y(Is,no,null),h(t,Km,u),h(t,Dt,u),e(Dt,Cn),e(Cn,uc),y(Ds,uc,null),e(Dt,vF),e(Dt,gc),e(gc,yF),h(t,Gm,u),h(t,Ue,u),y(Ns,Ue,null),e(Ue,TF),e(Ue,Os),e(Os,wF),e(Os,_c),e(_c,bF),e(Os,$F),e(Ue,RF),e(Ue,Ss),e(Ss,MF),e(Ss,pl),e(pl,xF),e(Ss,EF),e(Ue,zF),e(Ue,Ws),e(Ws,jF),e(Ws,Us),e(Us,qF),e(Ws,CF),e(Ue,PF),y(Pn,Ue,null),e(Ue,AF),e(Ue,ro),y(Bs,ro,null),e(ro,LF),e(ro,Nt),e(Nt,IF),e(Nt,ml),e(ml,DF),e(Nt,NF),e(Nt,kc),e(kc,OF),e(Nt,SF),e(ro,WF),y(An,ro,null),e(ro,UF),e(ro,Fc),e(Fc,BF),e(ro,HF),y(Hs,ro,null),h(t,Xm,u),h(t,Ot,u),e(Ot,Ln),e(Ln,vc),y(Qs,vc,null),e(Ot,QF),e(Ot,yc),e(yc,VF),h(t,Ym,u),h(t,Be,u),y(Vs,Be,null),e(Be,JF),e(Be,Js),e(Js,KF),e(Js,Tc),e(Tc,GF),e(Js,XF),e(Be,YF),e(Be,Ks),e(Ks,ZF),e(Ks,hl),e(hl,ev),e(Ks,ov),e(Be,tv),e(Be,Gs),e(Gs,nv),e(Gs,Xs),e(Xs,rv),e(Gs,sv),e(Be,av),y(In,Be,null),e(Be,iv),e(Be,jo),y(Ys,jo,null),e(jo,lv),e(jo,Ge),e(Ge,dv),e(Ge,wc),e(wc,cv),e(Ge,pv),e(Ge,bc),e(bc,mv),e(Ge,hv),e(Ge,$c),e($c,fv),e(Ge,uv),e(Ge,Rc),e(Rc,gv),e(Ge,_v),e(Ge,Mc),e(Mc,kv),e(Ge,Fv),e(jo,vv),e(jo,xc),e(xc,yv),e(jo,Tv),y(Zs,jo,null),h(t,Zm,u),h(t,St,u),e(St,Dn),e(Dn,Ec),y(ea,Ec,null),e(St,wv),e(St,zc),e(zc,bv),h(t,eh,u),h(t,He,u),y(oa,He,null),e(He,$v),e(He,jc),e(jc,Rv),e(He,Mv),e(He,ta),e(ta,xv),e(ta,fl),e(fl,Ev),e(ta,zv),e(He,jv),e(He,na),e(na,qv),e(na,ra),e(ra,Cv),e(na,Pv),e(He,Av),y(Nn,He,null),e(He,Lv),e(He,so),y(sa,so,null),e(so,Iv),e(so,Wt),e(Wt,Dv),e(Wt,ul),e(ul,Nv),e(Wt,Ov),e(Wt,qc),e(qc,Sv),e(Wt,Wv),e(so,Uv),y(On,so,null),e(so,Bv),e(so,Cc),e(Cc,Hv),e(so,Qv),y(aa,so,null),h(t,oh,u),h(t,Ut,u),e(Ut,Sn),e(Sn,Pc),y(ia,Pc,null),e(Ut,Vv),e(Ut,Ac),e(Ac,Jv),h(t,th,u),h(t,Qe,u),y(la,Qe,null),e(Qe,Kv),e(Qe,Lc),e(Lc,Gv),e(Qe,Xv),e(Qe,da),e(da,Yv),e(da,gl),e(gl,Zv),e(da,ey),e(Qe,oy),e(Qe,ca),e(ca,ty),e(ca,pa),e(pa,ny),e(ca,ry),e(Qe,sy),y(Wn,Qe,null),e(Qe,ay),e(Qe,ao),y(ma,ao,null),e(ao,iy),e(ao,Bt),e(Bt,ly),e(Bt,_l),e(_l,dy),e(Bt,cy),e(Bt,Ic),e(Ic,py),e(Bt,my),e(ao,hy),y(Un,ao,null),e(ao,fy),e(ao,Dc),e(Dc,uy),e(ao,gy),y(ha,ao,null),h(t,nh,u),h(t,Ht,u),e(Ht,Bn),e(Bn,Nc),y(fa,Nc,null),e(Ht,_y),e(Ht,Oc),e(Oc,ky),h(t,rh,u),h(t,Ve,u),y(ua,Ve,null),e(Ve,Fy),e(Ve,Sc),e(Sc,vy),e(Ve,yy),e(Ve,ga),e(ga,Ty),e(ga,kl),e(kl,wy),e(ga,by),e(Ve,$y),e(Ve,_a),e(_a,Ry),e(_a,ka),e(ka,My),e(_a,xy),e(Ve,Ey),y(Hn,Ve,null),e(Ve,zy),e(Ve,io),y(Fa,io,null),e(io,jy),e(io,Qt),e(Qt,qy),e(Qt,Fl),e(Fl,Cy),e(Qt,Py),e(Qt,Wc),e(Wc,Ay),e(Qt,Ly),e(io,Iy),y(Qn,io,null),e(io,Dy),e(io,Uc),e(Uc,Ny),e(io,Oy),y(va,io,null),h(t,sh,u),h(t,Vt,u),e(Vt,Vn),e(Vn,Bc),y(ya,Bc,null),e(Vt,Sy),e(Vt,Hc),e(Hc,Wy),h(t,ah,u),h(t,Je,u),y(Ta,Je,null),e(Je,Uy),e(Je,Jt),e(Jt,By),e(Jt,Qc),e(Qc,Hy),e(Jt,Qy),e(Jt,Vc),e(Vc,Vy),e(Jt,Jy),e(Je,Ky),e(Je,wa),e(wa,Gy),e(wa,vl),e(vl,Xy),e(wa,Yy),e(Je,Zy),e(Je,ba),e(ba,eT),e(ba,$a),e($a,oT),e(ba,tT),e(Je,nT),y(Jn,Je,null),e(Je,rT),e(Je,lo),y(Ra,lo,null),e(lo,sT),e(lo,Kt),e(Kt,aT),e(Kt,yl),e(yl,iT),e(Kt,lT),e(Kt,Jc),e(Jc,dT),e(Kt,cT),e(lo,pT),y(Kn,lo,null),e(lo,mT),e(lo,Kc),e(Kc,hT),e(lo,fT),y(Ma,lo,null),h(t,ih,u),h(t,Gt,u),e(Gt,Gn),e(Gn,Gc),y(xa,Gc,null),e(Gt,uT),e(Gt,Xc),e(Xc,gT),h(t,lh,u),h(t,Ce,u),y(Ea,Ce,null),e(Ce,_T),e(Ce,Yc),e(Yc,kT),e(Ce,FT),e(Ce,za),e(za,vT),e(za,Tl),e(Tl,yT),e(za,TT),e(Ce,wT),e(Ce,ja),e(ja,bT),e(ja,qa),e(qa,$T),e(ja,RT),e(Ce,MT),e(Ce,Zc),e(Zc,xT),e(Ce,ET),e(Ce,Wo),e(Wo,ep),e(ep,Ca),e(Ca,zT),e(Wo,jT),e(Wo,op),e(op,Pa),e(Pa,qT),e(Wo,CT),e(Wo,tp),e(tp,Aa),e(Aa,PT),e(Wo,AT),e(Wo,np),e(np,La),e(La,LT),e(Ce,IT),e(Ce,co),y(Ia,co,null),e(co,DT),e(co,Xt),e(Xt,NT),e(Xt,rp),e(rp,OT),e(Xt,ST),e(Xt,sp),e(sp,WT),e(Xt,UT),e(co,BT),y(Xn,co,null),e(co,HT),e(co,ap),e(ap,QT),e(co,VT),y(Da,co,null),h(t,dh,u),h(t,Yt,u),e(Yt,Yn),e(Yn,ip),y(Na,ip,null),e(Yt,JT),e(Yt,lp),e(lp,KT),h(t,ch,u),h(t,Pe,u),y(Oa,Pe,null),e(Pe,GT),e(Pe,Sa),e(Sa,XT),e(Sa,dp),e(dp,YT),e(Sa,ZT),e(Pe,e1),e(Pe,Wa),e(Wa,o1),e(Wa,wl),e(wl,t1),e(Wa,n1),e(Pe,r1),e(Pe,Ua),e(Ua,s1),e(Ua,Ba),e(Ba,a1),e(Ua,i1),e(Pe,l1),e(Pe,cp),e(cp,d1),e(Pe,c1),e(Pe,Uo),e(Uo,pp),e(pp,Ha),e(Ha,p1),e(Uo,m1),e(Uo,mp),e(mp,Qa),e(Qa,h1),e(Uo,f1),e(Uo,hp),e(hp,Va),e(Va,u1),e(Uo,g1),e(Uo,fp),e(fp,Ja),e(Ja,_1),e(Pe,k1),e(Pe,po),y(Ka,po,null),e(po,F1),e(po,Zt),e(Zt,v1),e(Zt,up),e(up,y1),e(Zt,T1),e(Zt,gp),e(gp,w1),e(Zt,b1),e(po,$1),y(Zn,po,null),e(po,R1),e(po,_p),e(_p,M1),e(po,x1),y(Ga,po,null),h(t,ph,u),h(t,en,u),e(en,er),e(er,kp),y(Xa,kp,null),e(en,E1),e(en,Fp),e(Fp,z1),h(t,mh,u),h(t,Ae,u),y(Ya,Ae,null),e(Ae,j1),e(Ae,vp),e(vp,q1),e(Ae,C1),e(Ae,Za),e(Za,P1),e(Za,bl),e(bl,A1),e(Za,L1),e(Ae,I1),e(Ae,ei),e(ei,D1),e(ei,oi),e(oi,N1),e(ei,O1),e(Ae,S1),e(Ae,yp),e(yp,W1),e(Ae,U1),e(Ae,Bo),e(Bo,Tp),e(Tp,ti),e(ti,B1),e(Bo,H1),e(Bo,wp),e(wp,ni),e(ni,Q1),e(Bo,V1),e(Bo,bp),e(bp,ri),e(ri,J1),e(Bo,K1),e(Bo,$p),e($p,si),e(si,G1),e(Ae,X1),e(Ae,mo),y(ai,mo,null),e(mo,Y1),e(mo,on),e(on,Z1),e(on,Rp),e(Rp,ew),e(on,ow),e(on,Mp),e(Mp,tw),e(on,nw),e(mo,rw),y(or,mo,null),e(mo,sw),e(mo,xp),e(xp,aw),e(mo,iw),y(ii,mo,null),h(t,hh,u),h(t,tn,u),e(tn,tr),e(tr,Ep),y(li,Ep,null),e(tn,lw),e(tn,zp),e(zp,dw),h(t,fh,u),h(t,Le,u),y(di,Le,null),e(Le,cw),e(Le,jp),e(jp,pw),e(Le,mw),e(Le,ci),e(ci,hw),e(ci,$l),e($l,fw),e(ci,uw),e(Le,gw),e(Le,pi),e(pi,_w),e(pi,mi),e(mi,kw),e(pi,Fw),e(Le,vw),e(Le,qp),e(qp,yw),e(Le,Tw),e(Le,Ho),e(Ho,Cp),e(Cp,hi),e(hi,ww),e(Ho,bw),e(Ho,Pp),e(Pp,fi),e(fi,$w),e(Ho,Rw),e(Ho,Ap),e(Ap,ui),e(ui,Mw),e(Ho,xw),e(Ho,Lp),e(Lp,gi),e(gi,Ew),e(Le,zw),e(Le,ho),y(_i,ho,null),e(ho,jw),e(ho,nn),e(nn,qw),e(nn,Ip),e(Ip,Cw),e(nn,Pw),e(nn,Dp),e(Dp,Aw),e(nn,Lw),e(ho,Iw),y(nr,ho,null),e(ho,Dw),e(ho,Np),e(Np,Nw),e(ho,Ow),y(ki,ho,null),h(t,uh,u),h(t,rn,u),e(rn,rr),e(rr,Op),y(Fi,Op,null),e(rn,Sw),e(rn,Sp),e(Sp,Ww),h(t,gh,u),h(t,Ie,u),y(vi,Ie,null),e(Ie,Uw),e(Ie,Wp),e(Wp,Bw),e(Ie,Hw),e(Ie,yi),e(yi,Qw),e(yi,Rl),e(Rl,Vw),e(yi,Jw),e(Ie,Kw),e(Ie,Ti),e(Ti,Gw),e(Ti,wi),e(wi,Xw),e(Ti,Yw),e(Ie,Zw),e(Ie,Up),e(Up,eb),e(Ie,ob),e(Ie,Qo),e(Qo,Bp),e(Bp,bi),e(bi,tb),e(Qo,nb),e(Qo,Hp),e(Hp,$i),e($i,rb),e(Qo,sb),e(Qo,Qp),e(Qp,Ri),e(Ri,ab),e(Qo,ib),e(Qo,Vp),e(Vp,Mi),e(Mi,lb),e(Ie,db),e(Ie,fo),y(xi,fo,null),e(fo,cb),e(fo,sn),e(sn,pb),e(sn,Jp),e(Jp,mb),e(sn,hb),e(sn,Kp),e(Kp,fb),e(sn,ub),e(fo,gb),y(sr,fo,null),e(fo,_b),e(fo,Gp),e(Gp,kb),e(fo,Fb),y(Ei,fo,null),h(t,_h,u),h(t,an,u),e(an,ar),e(ar,Xp),y(zi,Xp,null),e(an,vb),e(an,Yp),e(Yp,yb),h(t,kh,u),h(t,De,u),y(ji,De,null),e(De,Tb),e(De,ln),e(ln,wb),e(ln,Zp),e(Zp,bb),e(ln,$b),e(ln,em),e(em,Rb),e(ln,Mb),e(De,xb),e(De,qi),e(qi,Eb),e(qi,Ml),e(Ml,zb),e(qi,jb),e(De,qb),e(De,Ci),e(Ci,Cb),e(Ci,Pi),e(Pi,Pb),e(Ci,Ab),e(De,Lb),e(De,om),e(om,Ib),e(De,Db),e(De,Vo),e(Vo,tm),e(tm,Ai),e(Ai,Nb),e(Vo,Ob),e(Vo,nm),e(nm,Li),e(Li,Sb),e(Vo,Wb),e(Vo,rm),e(rm,Ii),e(Ii,Ub),e(Vo,Bb),e(Vo,sm),e(sm,Di),e(Di,Hb),e(De,Qb),e(De,uo),y(Ni,uo,null),e(uo,Vb),e(uo,dn),e(dn,Jb),e(dn,am),e(am,Kb),e(dn,Gb),e(dn,im),e(im,Xb),e(dn,Yb),e(uo,Zb),y(ir,uo,null),e(uo,e$),e(uo,lm),e(lm,o$),e(uo,t$),y(Oi,uo,null),Fh=!0},p(t,[u]){const Si={};u&2&&(Si.$$scope={dirty:u,ctx:t}),_n.$set(Si);const dm={};u&2&&(dm.$$scope={dirty:u,ctx:t}),Fn.$set(dm);const cm={};u&2&&(cm.$$scope={dirty:u,ctx:t}),yn.$set(cm);const pm={};u&2&&(pm.$$scope={dirty:u,ctx:t}),wn.$set(pm);const Wi={};u&2&&(Wi.$$scope={dirty:u,ctx:t}),$n.$set(Wi);const mm={};u&2&&(mm.$$scope={dirty:u,ctx:t}),Mn.$set(mm);const hm={};u&2&&(hm.$$scope={dirty:u,ctx:t}),En.$set(hm);const fm={};u&2&&(fm.$$scope={dirty:u,ctx:t}),jn.$set(fm);const Ui={};u&2&&(Ui.$$scope={dirty:u,ctx:t}),qn.$set(Ui);const um={};u&2&&(um.$$scope={dirty:u,ctx:t}),Pn.$set(um);const gm={};u&2&&(gm.$$scope={dirty:u,ctx:t}),An.$set(gm);const _m={};u&2&&(_m.$$scope={dirty:u,ctx:t}),In.$set(_m);const km={};u&2&&(km.$$scope={dirty:u,ctx:t}),Nn.$set(km);const Fm={};u&2&&(Fm.$$scope={dirty:u,ctx:t}),On.$set(Fm);const vm={};u&2&&(vm.$$scope={dirty:u,ctx:t}),Wn.$set(vm);const ym={};u&2&&(ym.$$scope={dirty:u,ctx:t}),Un.$set(ym);const cn={};u&2&&(cn.$$scope={dirty:u,ctx:t}),Hn.$set(cn);const Tm={};u&2&&(Tm.$$scope={dirty:u,ctx:t}),Qn.$set(Tm);const wm={};u&2&&(wm.$$scope={dirty:u,ctx:t}),Jn.$set(wm);const Bi={};u&2&&(Bi.$$scope={dirty:u,ctx:t}),Kn.$set(Bi);const bm={};u&2&&(bm.$$scope={dirty:u,ctx:t}),Xn.$set(bm);const $m={};u&2&&($m.$$scope={dirty:u,ctx:t}),Zn.$set($m);const Rm={};u&2&&(Rm.$$scope={dirty:u,ctx:t}),or.$set(Rm);const Eo={};u&2&&(Eo.$$scope={dirty:u,ctx:t}),nr.$set(Eo);const pn={};u&2&&(pn.$$scope={dirty:u,ctx:t}),sr.$set(pn);const Mm={};u&2&&(Mm.$$scope={dirty:u,ctx:t}),ir.$set(Mm)},i(t){Fh||(T(k.$$.fragment,t),T(oe.$$.fragment,t),T(ye.$$.fragment,t),T(D.$$.fragment,t),T(yr.$$.fragment,t),T(Tr.$$.fragment,t),T(wr.$$.fragment,t),T(Mr.$$.fragment,t),T(xr.$$.fragment,t),T(zr.$$.fragment,t),T(qr.$$.fragment,t),T(Cr.$$.fragment,t),T(Pr.$$.fragment,t),T(Ar.$$.fragment,t),T(Lr.$$.fragment,t),T(Nr.$$.fragment,t),T(Or.$$.fragment,t),T(Wr.$$.fragment,t),T(Ur.$$.fragment,t),T(Jr.$$.fragment,t),T(_n.$$.fragment,t),T(Kr.$$.fragment,t),T(Gr.$$.fragment,t),T(Xr.$$.fragment,t),T(Zr.$$.fragment,t),T(Fn.$$.fragment,t),T(es.$$.fragment,t),T(os.$$.fragment,t),T(ts.$$.fragment,t),T(rs.$$.fragment,t),T(yn.$$.fragment,t),T(ss.$$.fragment,t),T(as.$$.fragment,t),T(is.$$.fragment,t),T(cs.$$.fragment,t),T(wn.$$.fragment,t),T(ps.$$.fragment,t),T(ms.$$.fragment,t),T(hs.$$.fragment,t),T(fs.$$.fragment,t),T(_s.$$.fragment,t),T($n.$$.fragment,t),T(ks.$$.fragment,t),T(Fs.$$.fragment,t),T(vs.$$.fragment,t),T(ws.$$.fragment,t),T(Mn.$$.fragment,t),T(bs.$$.fragment,t),T($s.$$.fragment,t),T(Rs.$$.fragment,t),T(Es.$$.fragment,t),T(En.$$.fragment,t),T(zs.$$.fragment,t),T(js.$$.fragment,t),T(qs.$$.fragment,t),T(jn.$$.fragment,t),T(Ls.$$.fragment,t),T(qn.$$.fragment,t),T(Is.$$.fragment,t),T(Ds.$$.fragment,t),T(Ns.$$.fragment,t),T(Pn.$$.fragment,t),T(Bs.$$.fragment,t),T(An.$$.fragment,t),T(Hs.$$.fragment,t),T(Qs.$$.fragment,t),T(Vs.$$.fragment,t),T(In.$$.fragment,t),T(Ys.$$.fragment,t),T(Zs.$$.fragment,t),T(ea.$$.fragment,t),T(oa.$$.fragment,t),T(Nn.$$.fragment,t),T(sa.$$.fragment,t),T(On.$$.fragment,t),T(aa.$$.fragment,t),T(ia.$$.fragment,t),T(la.$$.fragment,t),T(Wn.$$.fragment,t),T(ma.$$.fragment,t),T(Un.$$.fragment,t),T(ha.$$.fragment,t),T(fa.$$.fragment,t),T(ua.$$.fragment,t),T(Hn.$$.fragment,t),T(Fa.$$.fragment,t),T(Qn.$$.fragment,t),T(va.$$.fragment,t),T(ya.$$.fragment,t),T(Ta.$$.fragment,t),T(Jn.$$.fragment,t),T(Ra.$$.fragment,t),T(Kn.$$.fragment,t),T(Ma.$$.fragment,t),T(xa.$$.fragment,t),T(Ea.$$.fragment,t),T(Ia.$$.fragment,t),T(Xn.$$.fragment,t),T(Da.$$.fragment,t),T(Na.$$.fragment,t),T(Oa.$$.fragment,t),T(Ka.$$.fragment,t),T(Zn.$$.fragment,t),T(Ga.$$.fragment,t),T(Xa.$$.fragment,t),T(Ya.$$.fragment,t),T(ai.$$.fragment,t),T(or.$$.fragment,t),T(ii.$$.fragment,t),T(li.$$.fragment,t),T(di.$$.fragment,t),T(_i.$$.fragment,t),T(nr.$$.fragment,t),T(ki.$$.fragment,t),T(Fi.$$.fragment,t),T(vi.$$.fragment,t),T(xi.$$.fragment,t),T(sr.$$.fragment,t),T(Ei.$$.fragment,t),T(zi.$$.fragment,t),T(ji.$$.fragment,t),T(Ni.$$.fragment,t),T(ir.$$.fragment,t),T(Oi.$$.fragment,t),Fh=!0)},o(t){w(k.$$.fragment,t),w(oe.$$.fragment,t),w(ye.$$.fragment,t),w(D.$$.fragment,t),w(yr.$$.fragment,t),w(Tr.$$.fragment,t),w(wr.$$.fragment,t),w(Mr.$$.fragment,t),w(xr.$$.fragment,t),w(zr.$$.fragment,t),w(qr.$$.fragment,t),w(Cr.$$.fragment,t),w(Pr.$$.fragment,t),w(Ar.$$.fragment,t),w(Lr.$$.fragment,t),w(Nr.$$.fragment,t),w(Or.$$.fragment,t),w(Wr.$$.fragment,t),w(Ur.$$.fragment,t),w(Jr.$$.fragment,t),w(_n.$$.fragment,t),w(Kr.$$.fragment,t),w(Gr.$$.fragment,t),w(Xr.$$.fragment,t),w(Zr.$$.fragment,t),w(Fn.$$.fragment,t),w(es.$$.fragment,t),w(os.$$.fragment,t),w(ts.$$.fragment,t),w(rs.$$.fragment,t),w(yn.$$.fragment,t),w(ss.$$.fragment,t),w(as.$$.fragment,t),w(is.$$.fragment,t),w(cs.$$.fragment,t),w(wn.$$.fragment,t),w(ps.$$.fragment,t),w(ms.$$.fragment,t),w(hs.$$.fragment,t),w(fs.$$.fragment,t),w(_s.$$.fragment,t),w($n.$$.fragment,t),w(ks.$$.fragment,t),w(Fs.$$.fragment,t),w(vs.$$.fragment,t),w(ws.$$.fragment,t),w(Mn.$$.fragment,t),w(bs.$$.fragment,t),w($s.$$.fragment,t),w(Rs.$$.fragment,t),w(Es.$$.fragment,t),w(En.$$.fragment,t),w(zs.$$.fragment,t),w(js.$$.fragment,t),w(qs.$$.fragment,t),w(jn.$$.fragment,t),w(Ls.$$.fragment,t),w(qn.$$.fragment,t),w(Is.$$.fragment,t),w(Ds.$$.fragment,t),w(Ns.$$.fragment,t),w(Pn.$$.fragment,t),w(Bs.$$.fragment,t),w(An.$$.fragment,t),w(Hs.$$.fragment,t),w(Qs.$$.fragment,t),w(Vs.$$.fragment,t),w(In.$$.fragment,t),w(Ys.$$.fragment,t),w(Zs.$$.fragment,t),w(ea.$$.fragment,t),w(oa.$$.fragment,t),w(Nn.$$.fragment,t),w(sa.$$.fragment,t),w(On.$$.fragment,t),w(aa.$$.fragment,t),w(ia.$$.fragment,t),w(la.$$.fragment,t),w(Wn.$$.fragment,t),w(ma.$$.fragment,t),w(Un.$$.fragment,t),w(ha.$$.fragment,t),w(fa.$$.fragment,t),w(ua.$$.fragment,t),w(Hn.$$.fragment,t),w(Fa.$$.fragment,t),w(Qn.$$.fragment,t),w(va.$$.fragment,t),w(ya.$$.fragment,t),w(Ta.$$.fragment,t),w(Jn.$$.fragment,t),w(Ra.$$.fragment,t),w(Kn.$$.fragment,t),w(Ma.$$.fragment,t),w(xa.$$.fragment,t),w(Ea.$$.fragment,t),w(Ia.$$.fragment,t),w(Xn.$$.fragment,t),w(Da.$$.fragment,t),w(Na.$$.fragment,t),w(Oa.$$.fragment,t),w(Ka.$$.fragment,t),w(Zn.$$.fragment,t),w(Ga.$$.fragment,t),w(Xa.$$.fragment,t),w(Ya.$$.fragment,t),w(ai.$$.fragment,t),w(or.$$.fragment,t),w(ii.$$.fragment,t),w(li.$$.fragment,t),w(di.$$.fragment,t),w(_i.$$.fragment,t),w(nr.$$.fragment,t),w(ki.$$.fragment,t),w(Fi.$$.fragment,t),w(vi.$$.fragment,t),w(xi.$$.fragment,t),w(sr.$$.fragment,t),w(Ei.$$.fragment,t),w(zi.$$.fragment,t),w(ji.$$.fragment,t),w(Ni.$$.fragment,t),w(ir.$$.fragment,t),w(Oi.$$.fragment,t),Fh=!1},d(t){o(p),t&&o(R),t&&o(g),b(k),t&&o(K),t&&o(E),b(oe),t&&o(le),t&&o(J),t&&o(q),t&&o(re),t&&o(de),t&&o(se),t&&o(ce),t&&o(j),t&&o(U),t&&o(ae),t&&o(pe),t&&o(X),t&&o($e),t&&o(Fe),b(ye),t&&o(Re),t&&o(ee),b(D),b(yr),t&&o(Em),t&&o(gt),b(Tr),t&&o(zm),t&&o(je),b(wr),b(Mr),b(xr),b(zr),b(qr),b(Cr),b(Pr),t&&o(jm),t&&o(kt),b(Ar),t&&o(qm),t&&o(qe),b(Lr),b(Nr),b(Or),t&&o(Cm),t&&o(Ft),b(Wr),t&&o(Pm),t&&o(Ke),b(Ur),b(Jr),b(_n),b(Kr),t&&o(Am),t&&o(yt),b(Gr),t&&o(Lm),t&&o(Oo),b(Xr),b(Zr),b(Fn),b(es),t&&o(Im),t&&o(bt),b(os),t&&o(Dm),t&&o(So),b(ts),b(rs),b(yn),b(ss),t&&o(Nm),t&&o(Mt),b(as),t&&o(Om),t&&o($o),b(is),b(cs),b(wn),b(ps),b(ms),t&&o(Sm),t&&o(Et),b(hs),t&&o(Wm),t&&o(Ro),b(fs),b(_s),b($n),b(ks),t&&o(Um),t&&o(jt),b(Fs),t&&o(Bm),t&&o(Mo),b(vs),b(ws),b(Mn),b(bs),t&&o(Hm),t&&o(Ct),b($s),t&&o(Qm),t&&o(xo),b(Rs),b(Es),b(En),b(zs),t&&o(Vm),t&&o(Lt),b(js),t&&o(Jm),t&&o(We),b(qs),b(jn),b(Ls),b(qn),b(Is),t&&o(Km),t&&o(Dt),b(Ds),t&&o(Gm),t&&o(Ue),b(Ns),b(Pn),b(Bs),b(An),b(Hs),t&&o(Xm),t&&o(Ot),b(Qs),t&&o(Ym),t&&o(Be),b(Vs),b(In),b(Ys),b(Zs),t&&o(Zm),t&&o(St),b(ea),t&&o(eh),t&&o(He),b(oa),b(Nn),b(sa),b(On),b(aa),t&&o(oh),t&&o(Ut),b(ia),t&&o(th),t&&o(Qe),b(la),b(Wn),b(ma),b(Un),b(ha),t&&o(nh),t&&o(Ht),b(fa),t&&o(rh),t&&o(Ve),b(ua),b(Hn),b(Fa),b(Qn),b(va),t&&o(sh),t&&o(Vt),b(ya),t&&o(ah),t&&o(Je),b(Ta),b(Jn),b(Ra),b(Kn),b(Ma),t&&o(ih),t&&o(Gt),b(xa),t&&o(lh),t&&o(Ce),b(Ea),b(Ia),b(Xn),b(Da),t&&o(dh),t&&o(Yt),b(Na),t&&o(ch),t&&o(Pe),b(Oa),b(Ka),b(Zn),b(Ga),t&&o(ph),t&&o(en),b(Xa),t&&o(mh),t&&o(Ae),b(Ya),b(ai),b(or),b(ii),t&&o(hh),t&&o(tn),b(li),t&&o(fh),t&&o(Le),b(di),b(_i),b(nr),b(ki),t&&o(uh),t&&o(rn),b(Fi),t&&o(gh),t&&o(Ie),b(vi),b(xi),b(sr),b(Ei),t&&o(_h),t&&o(an),b(zi),t&&o(kh),t&&o(De),b(ji),b(Ni),b(ir),b(Oi)}}}const Ix={local:"roformer",sections:[{local:"overview",title:"Overview"},{local:"transformers.RoFormerConfig",title:"RoFormerConfig"},{local:"transformers.RoFormerTokenizer",title:"RoFormerTokenizer"},{local:"transformers.RoFormerTokenizerFast",title:"RoFormerTokenizerFast"},{local:"transformers.RoFormerModel",title:"RoFormerModel"},{local:"transformers.RoFormerForCausalLM",title:"RoFormerForCausalLM"},{local:"transformers.RoFormerForMaskedLM",title:"RoFormerForMaskedLM"},{local:"transformers.RoFormerForSequenceClassification",title:"RoFormerForSequenceClassification"},{local:"transformers.RoFormerForMultipleChoice",title:"RoFormerForMultipleChoice"},{local:"transformers.RoFormerForTokenClassification",title:"RoFormerForTokenClassification"},{local:"transformers.RoFormerForQuestionAnswering",title:"RoFormerForQuestionAnswering"},{local:"transformers.TFRoFormerModel",title:"TFRoFormerModel"},{local:"transformers.TFRoFormerForMaskedLM",title:"TFRoFormerForMaskedLM"},{local:"transformers.TFRoFormerForCausalLM",title:"TFRoFormerForCausalLM"},{local:"transformers.TFRoFormerForSequenceClassification",title:"TFRoFormerForSequenceClassification"},{local:"transformers.TFRoFormerForMultipleChoice",title:"TFRoFormerForMultipleChoice"},{local:"transformers.TFRoFormerForTokenClassification",title:"TFRoFormerForTokenClassification"},{local:"transformers.TFRoFormerForQuestionAnswering",title:"TFRoFormerForQuestionAnswering"},{local:"transformers.FlaxRoFormerModel",title:"FlaxRoFormerModel"},{local:"transformers.FlaxRoFormerForMaskedLM",title:"FlaxRoFormerForMaskedLM"},{local:"transformers.FlaxRoFormerForSequenceClassification",title:"FlaxRoFormerForSequenceClassification"},{local:"transformers.FlaxRoFormerForMultipleChoice",title:"FlaxRoFormerForMultipleChoice"},{local:"transformers.FlaxRoFormerForTokenClassification",title:"FlaxRoFormerForTokenClassification"},{local:"transformers.FlaxRoFormerForQuestionAnswering",title:"FlaxRoFormerForQuestionAnswering"}],title:"RoFormer"};function Dx(P,p,R){let{fw:g}=p;return P.$$set=_=>{"fw"in _&&R(0,g=_.fw)},[g]}class Hx extends ax{constructor(p){super();ix(this,p,Dx,Lx,lx,{fw:0})}}export{Hx as default,Ix as metadata};
