import{S as uz,i as fz,s as mz,e as n,k as l,w as T,t as a,M as gz,c as s,d as t,m as d,a as r,x as y,h as i,b as c,F as e,g as h,y as v,q as w,o as $,B as F}from"../../chunks/vendor-4833417e.js";import{T as fe}from"../../chunks/Tip-fffd6df1.js";import{D as j}from"../../chunks/Docstring-4f315ed9.js";import{C as we}from"../../chunks/CodeBlock-6a3d1b46.js";import{I as ye}from"../../chunks/IconCopyLink-4b81c553.js";import"../../chunks/CopyButton-dacfbfaf.js";function _z(q){let p,R,m,b,k;return{c(){p=n("p"),R=a("When used with "),m=n("code"),b=a("is_split_into_words=True"),k=a(", this tokenizer will add a space before each word (even the first one).")},l(_){p=s(_,"P",{});var f=r(p);R=i(f,"When used with "),m=s(f,"CODE",{});var M=r(m);b=i(M,"is_split_into_words=True"),M.forEach(t),k=i(f,", this tokenizer will add a space before each word (even the first one)."),f.forEach(t)},m(_,f){h(_,p,f),e(p,R),e(p,m),e(m,b),e(p,k)},d(_){_&&t(p)}}}function bz(q){let p,R,m,b,k,_,f,M;return{c(){p=n("p"),R=a("When used with "),m=n("code"),b=a("is_split_into_words=True"),k=a(", this tokenizer needs to be instantiated with "),_=n("code"),f=a("add_prefix_space=True"),M=a(".")},l(Y){p=s(Y,"P",{});var I=r(p);R=i(I,"When used with "),m=s(I,"CODE",{});var z=r(m);b=i(z,"is_split_into_words=True"),z.forEach(t),k=i(I,", this tokenizer needs to be instantiated with "),_=s(I,"CODE",{});var X=r(_);f=i(X,"add_prefix_space=True"),X.forEach(t),M=i(I,"."),I.forEach(t)},m(Y,I){h(Y,p,I),e(p,R),e(p,m),e(m,b),e(p,k),e(p,_),e(_,f),e(p,M)},d(Y){Y&&t(p)}}}function kz(q){let p,R,m,b,k;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),b=a("Module"),k=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(_){p=s(_,"P",{});var f=r(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(f,"CODE",{});var M=r(m);b=i(M,"Module"),M.forEach(t),k=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(t)},m(_,f){h(_,p,f),e(p,R),e(p,m),e(m,b),e(p,k)},d(_){_&&t(p)}}}function Tz(q){let p,R,m,b,k;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),b=a("Module"),k=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(_){p=s(_,"P",{});var f=r(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(f,"CODE",{});var M=r(m);b=i(M,"Module"),M.forEach(t),k=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(t)},m(_,f){h(_,p,f),e(p,R),e(p,m),e(m,b),e(p,k)},d(_){_&&t(p)}}}function yz(q){let p,R,m,b,k;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),b=a("Module"),k=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(_){p=s(_,"P",{});var f=r(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(f,"CODE",{});var M=r(m);b=i(M,"Module"),M.forEach(t),k=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(t)},m(_,f){h(_,p,f),e(p,R),e(p,m),e(m,b),e(p,k)},d(_){_&&t(p)}}}function vz(q){let p,R,m,b,k;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),b=a("Module"),k=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(_){p=s(_,"P",{});var f=r(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(f,"CODE",{});var M=r(m);b=i(M,"Module"),M.forEach(t),k=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(t)},m(_,f){h(_,p,f),e(p,R),e(p,m),e(m,b),e(p,k)},d(_){_&&t(p)}}}function wz(q){let p,R,m,b,k;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),b=a("Module"),k=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(_){p=s(_,"P",{});var f=r(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(f,"CODE",{});var M=r(m);b=i(M,"Module"),M.forEach(t),k=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(t)},m(_,f){h(_,p,f),e(p,R),e(p,m),e(m,b),e(p,k)},d(_){_&&t(p)}}}function $z(q){let p,R,m,b,k;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),b=a("Module"),k=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(_){p=s(_,"P",{});var f=r(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(f,"CODE",{});var M=r(m);b=i(M,"Module"),M.forEach(t),k=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(t)},m(_,f){h(_,p,f),e(p,R),e(p,m),e(m,b),e(p,k)},d(_){_&&t(p)}}}function Fz(q){let p,R,m,b,k;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),b=a("Module"),k=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(_){p=s(_,"P",{});var f=r(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(f,"CODE",{});var M=r(m);b=i(M,"Module"),M.forEach(t),k=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(t)},m(_,f){h(_,p,f),e(p,R),e(p,m),e(m,b),e(p,k)},d(_){_&&t(p)}}}function Rz(q){let p,R,m,b,k,_,f,M,Y,I,z,X,D,te,me,S,ge,pe,K,A,oe,Z,x,P,se,U,he,re,H,ue,ae,C,_e,W,ie,be,B,G,ne,O,le,Q,ke;return{c(){p=n("p"),R=a("TF 2.0 models accepts two formats as inputs:"),m=l(),b=n("ul"),k=n("li"),_=a("having all inputs as keyword arguments (like PyTorch models), or"),f=l(),M=n("li"),Y=a("having all inputs as a list, tuple or dict in the first positional arguments."),I=l(),z=n("p"),X=a("This second option is useful when using "),D=n("code"),te=a("tf.keras.Model.fit"),me=a(` method which currently requires having all the
tensors in the first argument of the model call function: `),S=n("code"),ge=a("model(inputs)"),pe=a("."),K=l(),A=n("p"),oe=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 :`),Z=l(),x=n("ul"),P=n("li"),se=a("a single Tensor with "),U=n("code"),he=a("input_ids"),re=a(" only and nothing else: "),H=n("code"),ue=a("model(inputs_ids)"),ae=l(),C=n("li"),_e=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=n("code"),ie=a("model([input_ids, attention_mask])"),be=a(" or "),B=n("code"),G=a("model([input_ids, attention_mask, token_type_ids])"),ne=l(),O=n("li"),le=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=n("code"),ke=a('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(u){p=s(u,"P",{});var E=r(p);R=i(E,"TF 2.0 models accepts two formats as inputs:"),E.forEach(t),m=d(u),b=s(u,"UL",{});var ee=r(b);k=s(ee,"LI",{});var Me=r(k);_=i(Me,"having all inputs as keyword arguments (like PyTorch models), or"),Me.forEach(t),f=d(ee),M=s(ee,"LI",{});var ce=r(M);Y=i(ce,"having all inputs as a list, tuple or dict in the first positional arguments."),ce.forEach(t),ee.forEach(t),I=d(u),z=s(u,"P",{});var N=r(z);X=i(N,"This second option is useful when using "),D=s(N,"CODE",{});var $e=r(D);te=i($e,"tf.keras.Model.fit"),$e.forEach(t),me=i(N,` method which currently requires having all the
tensors in the first argument of the model call function: `),S=s(N,"CODE",{});var Ee=r(S);ge=i(Ee,"model(inputs)"),Ee.forEach(t),pe=i(N,"."),N.forEach(t),K=d(u),A=s(u,"P",{});var ze=r(A);oe=i(ze,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),ze.forEach(t),Z=d(u),x=s(u,"UL",{});var L=r(x);P=s(L,"LI",{});var V=r(P);se=i(V,"a single Tensor with "),U=s(V,"CODE",{});var xe=r(U);he=i(xe,"input_ids"),xe.forEach(t),re=i(V," only and nothing else: "),H=s(V,"CODE",{});var Fe=r(H);ue=i(Fe,"model(inputs_ids)"),Fe.forEach(t),V.forEach(t),ae=d(L),C=s(L,"LI",{});var J=r(C);_e=i(J,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=s(J,"CODE",{});var qe=r(W);ie=i(qe,"model([input_ids, attention_mask])"),qe.forEach(t),be=i(J," or "),B=s(J,"CODE",{});var Ce=r(B);G=i(Ce,"model([input_ids, attention_mask, token_type_ids])"),Ce.forEach(t),J.forEach(t),ne=d(L),O=s(L,"LI",{});var de=r(O);le=i(de,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=s(de,"CODE",{});var ve=r(Q);ke=i(ve,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ve.forEach(t),de.forEach(t),L.forEach(t)},m(u,E){h(u,p,E),e(p,R),h(u,m,E),h(u,b,E),e(b,k),e(k,_),e(b,f),e(b,M),e(M,Y),h(u,I,E),h(u,z,E),e(z,X),e(z,D),e(D,te),e(z,me),e(z,S),e(S,ge),e(z,pe),h(u,K,E),h(u,A,E),e(A,oe),h(u,Z,E),h(u,x,E),e(x,P),e(P,se),e(P,U),e(U,he),e(P,re),e(P,H),e(H,ue),e(x,ae),e(x,C),e(C,_e),e(C,W),e(W,ie),e(C,be),e(C,B),e(B,G),e(x,ne),e(x,O),e(O,le),e(O,Q),e(Q,ke)},d(u){u&&t(p),u&&t(m),u&&t(b),u&&t(I),u&&t(z),u&&t(K),u&&t(A),u&&t(Z),u&&t(x)}}}function Mz(q){let p,R,m,b,k;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),b=a("Module"),k=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(_){p=s(_,"P",{});var f=r(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(f,"CODE",{});var M=r(m);b=i(M,"Module"),M.forEach(t),k=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(t)},m(_,f){h(_,p,f),e(p,R),e(p,m),e(m,b),e(p,k)},d(_){_&&t(p)}}}function Ez(q){let p,R,m,b,k;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),b=a("Module"),k=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(_){p=s(_,"P",{});var f=r(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(f,"CODE",{});var M=r(m);b=i(M,"Module"),M.forEach(t),k=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(t)},m(_,f){h(_,p,f),e(p,R),e(p,m),e(m,b),e(p,k)},d(_){_&&t(p)}}}function zz(q){let p,R,m,b,k,_,f,M,Y,I,z,X,D,te,me,S,ge,pe,K,A,oe,Z,x,P,se,U,he,re,H,ue,ae,C,_e,W,ie,be,B,G,ne,O,le,Q,ke;return{c(){p=n("p"),R=a("TF 2.0 models accepts two formats as inputs:"),m=l(),b=n("ul"),k=n("li"),_=a("having all inputs as keyword arguments (like PyTorch models), or"),f=l(),M=n("li"),Y=a("having all inputs as a list, tuple or dict in the first positional arguments."),I=l(),z=n("p"),X=a("This second option is useful when using "),D=n("code"),te=a("tf.keras.Model.fit"),me=a(` method which currently requires having all the
tensors in the first argument of the model call function: `),S=n("code"),ge=a("model(inputs)"),pe=a("."),K=l(),A=n("p"),oe=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 :`),Z=l(),x=n("ul"),P=n("li"),se=a("a single Tensor with "),U=n("code"),he=a("input_ids"),re=a(" only and nothing else: "),H=n("code"),ue=a("model(inputs_ids)"),ae=l(),C=n("li"),_e=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=n("code"),ie=a("model([input_ids, attention_mask])"),be=a(" or "),B=n("code"),G=a("model([input_ids, attention_mask, token_type_ids])"),ne=l(),O=n("li"),le=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=n("code"),ke=a('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(u){p=s(u,"P",{});var E=r(p);R=i(E,"TF 2.0 models accepts two formats as inputs:"),E.forEach(t),m=d(u),b=s(u,"UL",{});var ee=r(b);k=s(ee,"LI",{});var Me=r(k);_=i(Me,"having all inputs as keyword arguments (like PyTorch models), or"),Me.forEach(t),f=d(ee),M=s(ee,"LI",{});var ce=r(M);Y=i(ce,"having all inputs as a list, tuple or dict in the first positional arguments."),ce.forEach(t),ee.forEach(t),I=d(u),z=s(u,"P",{});var N=r(z);X=i(N,"This second option is useful when using "),D=s(N,"CODE",{});var $e=r(D);te=i($e,"tf.keras.Model.fit"),$e.forEach(t),me=i(N,` method which currently requires having all the
tensors in the first argument of the model call function: `),S=s(N,"CODE",{});var Ee=r(S);ge=i(Ee,"model(inputs)"),Ee.forEach(t),pe=i(N,"."),N.forEach(t),K=d(u),A=s(u,"P",{});var ze=r(A);oe=i(ze,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),ze.forEach(t),Z=d(u),x=s(u,"UL",{});var L=r(x);P=s(L,"LI",{});var V=r(P);se=i(V,"a single Tensor with "),U=s(V,"CODE",{});var xe=r(U);he=i(xe,"input_ids"),xe.forEach(t),re=i(V," only and nothing else: "),H=s(V,"CODE",{});var Fe=r(H);ue=i(Fe,"model(inputs_ids)"),Fe.forEach(t),V.forEach(t),ae=d(L),C=s(L,"LI",{});var J=r(C);_e=i(J,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=s(J,"CODE",{});var qe=r(W);ie=i(qe,"model([input_ids, attention_mask])"),qe.forEach(t),be=i(J," or "),B=s(J,"CODE",{});var Ce=r(B);G=i(Ce,"model([input_ids, attention_mask, token_type_ids])"),Ce.forEach(t),J.forEach(t),ne=d(L),O=s(L,"LI",{});var de=r(O);le=i(de,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=s(de,"CODE",{});var ve=r(Q);ke=i(ve,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ve.forEach(t),de.forEach(t),L.forEach(t)},m(u,E){h(u,p,E),e(p,R),h(u,m,E),h(u,b,E),e(b,k),e(k,_),e(b,f),e(b,M),e(M,Y),h(u,I,E),h(u,z,E),e(z,X),e(z,D),e(D,te),e(z,me),e(z,S),e(S,ge),e(z,pe),h(u,K,E),h(u,A,E),e(A,oe),h(u,Z,E),h(u,x,E),e(x,P),e(P,se),e(P,U),e(U,he),e(P,re),e(P,H),e(H,ue),e(x,ae),e(x,C),e(C,_e),e(C,W),e(W,ie),e(C,be),e(C,B),e(B,G),e(x,ne),e(x,O),e(O,le),e(O,Q),e(Q,ke)},d(u){u&&t(p),u&&t(m),u&&t(b),u&&t(I),u&&t(z),u&&t(K),u&&t(A),u&&t(Z),u&&t(x)}}}function xz(q){let p,R,m,b,k;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),b=a("Module"),k=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(_){p=s(_,"P",{});var f=r(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(f,"CODE",{});var M=r(m);b=i(M,"Module"),M.forEach(t),k=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(t)},m(_,f){h(_,p,f),e(p,R),e(p,m),e(m,b),e(p,k)},d(_){_&&t(p)}}}function qz(q){let p,R,m,b,k,_,f,M,Y,I,z,X,D,te,me,S,ge,pe,K,A,oe,Z,x,P,se,U,he,re,H,ue,ae,C,_e,W,ie,be,B,G,ne,O,le,Q,ke;return{c(){p=n("p"),R=a("TF 2.0 models accepts two formats as inputs:"),m=l(),b=n("ul"),k=n("li"),_=a("having all inputs as keyword arguments (like PyTorch models), or"),f=l(),M=n("li"),Y=a("having all inputs as a list, tuple or dict in the first positional arguments."),I=l(),z=n("p"),X=a("This second option is useful when using "),D=n("code"),te=a("tf.keras.Model.fit"),me=a(` method which currently requires having all the
tensors in the first argument of the model call function: `),S=n("code"),ge=a("model(inputs)"),pe=a("."),K=l(),A=n("p"),oe=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 :`),Z=l(),x=n("ul"),P=n("li"),se=a("a single Tensor with "),U=n("code"),he=a("input_ids"),re=a(" only and nothing else: "),H=n("code"),ue=a("model(inputs_ids)"),ae=l(),C=n("li"),_e=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=n("code"),ie=a("model([input_ids, attention_mask])"),be=a(" or "),B=n("code"),G=a("model([input_ids, attention_mask, token_type_ids])"),ne=l(),O=n("li"),le=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=n("code"),ke=a('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(u){p=s(u,"P",{});var E=r(p);R=i(E,"TF 2.0 models accepts two formats as inputs:"),E.forEach(t),m=d(u),b=s(u,"UL",{});var ee=r(b);k=s(ee,"LI",{});var Me=r(k);_=i(Me,"having all inputs as keyword arguments (like PyTorch models), or"),Me.forEach(t),f=d(ee),M=s(ee,"LI",{});var ce=r(M);Y=i(ce,"having all inputs as a list, tuple or dict in the first positional arguments."),ce.forEach(t),ee.forEach(t),I=d(u),z=s(u,"P",{});var N=r(z);X=i(N,"This second option is useful when using "),D=s(N,"CODE",{});var $e=r(D);te=i($e,"tf.keras.Model.fit"),$e.forEach(t),me=i(N,` method which currently requires having all the
tensors in the first argument of the model call function: `),S=s(N,"CODE",{});var Ee=r(S);ge=i(Ee,"model(inputs)"),Ee.forEach(t),pe=i(N,"."),N.forEach(t),K=d(u),A=s(u,"P",{});var ze=r(A);oe=i(ze,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),ze.forEach(t),Z=d(u),x=s(u,"UL",{});var L=r(x);P=s(L,"LI",{});var V=r(P);se=i(V,"a single Tensor with "),U=s(V,"CODE",{});var xe=r(U);he=i(xe,"input_ids"),xe.forEach(t),re=i(V," only and nothing else: "),H=s(V,"CODE",{});var Fe=r(H);ue=i(Fe,"model(inputs_ids)"),Fe.forEach(t),V.forEach(t),ae=d(L),C=s(L,"LI",{});var J=r(C);_e=i(J,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=s(J,"CODE",{});var qe=r(W);ie=i(qe,"model([input_ids, attention_mask])"),qe.forEach(t),be=i(J," or "),B=s(J,"CODE",{});var Ce=r(B);G=i(Ce,"model([input_ids, attention_mask, token_type_ids])"),Ce.forEach(t),J.forEach(t),ne=d(L),O=s(L,"LI",{});var de=r(O);le=i(de,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=s(de,"CODE",{});var ve=r(Q);ke=i(ve,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ve.forEach(t),de.forEach(t),L.forEach(t)},m(u,E){h(u,p,E),e(p,R),h(u,m,E),h(u,b,E),e(b,k),e(k,_),e(b,f),e(b,M),e(M,Y),h(u,I,E),h(u,z,E),e(z,X),e(z,D),e(D,te),e(z,me),e(z,S),e(S,ge),e(z,pe),h(u,K,E),h(u,A,E),e(A,oe),h(u,Z,E),h(u,x,E),e(x,P),e(P,se),e(P,U),e(U,he),e(P,re),e(P,H),e(H,ue),e(x,ae),e(x,C),e(C,_e),e(C,W),e(W,ie),e(C,be),e(C,B),e(B,G),e(x,ne),e(x,O),e(O,le),e(O,Q),e(Q,ke)},d(u){u&&t(p),u&&t(m),u&&t(b),u&&t(I),u&&t(z),u&&t(K),u&&t(A),u&&t(Z),u&&t(x)}}}function Cz(q){let p,R,m,b,k;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),b=a("Module"),k=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(_){p=s(_,"P",{});var f=r(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(f,"CODE",{});var M=r(m);b=i(M,"Module"),M.forEach(t),k=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(t)},m(_,f){h(_,p,f),e(p,R),e(p,m),e(m,b),e(p,k)},d(_){_&&t(p)}}}function Pz(q){let p,R,m,b,k,_,f,M,Y,I,z,X,D,te,me,S,ge,pe,K,A,oe,Z,x,P,se,U,he,re,H,ue,ae,C,_e,W,ie,be,B,G,ne,O,le,Q,ke;return{c(){p=n("p"),R=a("TF 2.0 models accepts two formats as inputs:"),m=l(),b=n("ul"),k=n("li"),_=a("having all inputs as keyword arguments (like PyTorch models), or"),f=l(),M=n("li"),Y=a("having all inputs as a list, tuple or dict in the first positional arguments."),I=l(),z=n("p"),X=a("This second option is useful when using "),D=n("code"),te=a("tf.keras.Model.fit"),me=a(` method which currently requires having all the
tensors in the first argument of the model call function: `),S=n("code"),ge=a("model(inputs)"),pe=a("."),K=l(),A=n("p"),oe=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 :`),Z=l(),x=n("ul"),P=n("li"),se=a("a single Tensor with "),U=n("code"),he=a("input_ids"),re=a(" only and nothing else: "),H=n("code"),ue=a("model(inputs_ids)"),ae=l(),C=n("li"),_e=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=n("code"),ie=a("model([input_ids, attention_mask])"),be=a(" or "),B=n("code"),G=a("model([input_ids, attention_mask, token_type_ids])"),ne=l(),O=n("li"),le=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=n("code"),ke=a('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(u){p=s(u,"P",{});var E=r(p);R=i(E,"TF 2.0 models accepts two formats as inputs:"),E.forEach(t),m=d(u),b=s(u,"UL",{});var ee=r(b);k=s(ee,"LI",{});var Me=r(k);_=i(Me,"having all inputs as keyword arguments (like PyTorch models), or"),Me.forEach(t),f=d(ee),M=s(ee,"LI",{});var ce=r(M);Y=i(ce,"having all inputs as a list, tuple or dict in the first positional arguments."),ce.forEach(t),ee.forEach(t),I=d(u),z=s(u,"P",{});var N=r(z);X=i(N,"This second option is useful when using "),D=s(N,"CODE",{});var $e=r(D);te=i($e,"tf.keras.Model.fit"),$e.forEach(t),me=i(N,` method which currently requires having all the
tensors in the first argument of the model call function: `),S=s(N,"CODE",{});var Ee=r(S);ge=i(Ee,"model(inputs)"),Ee.forEach(t),pe=i(N,"."),N.forEach(t),K=d(u),A=s(u,"P",{});var ze=r(A);oe=i(ze,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),ze.forEach(t),Z=d(u),x=s(u,"UL",{});var L=r(x);P=s(L,"LI",{});var V=r(P);se=i(V,"a single Tensor with "),U=s(V,"CODE",{});var xe=r(U);he=i(xe,"input_ids"),xe.forEach(t),re=i(V," only and nothing else: "),H=s(V,"CODE",{});var Fe=r(H);ue=i(Fe,"model(inputs_ids)"),Fe.forEach(t),V.forEach(t),ae=d(L),C=s(L,"LI",{});var J=r(C);_e=i(J,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=s(J,"CODE",{});var qe=r(W);ie=i(qe,"model([input_ids, attention_mask])"),qe.forEach(t),be=i(J," or "),B=s(J,"CODE",{});var Ce=r(B);G=i(Ce,"model([input_ids, attention_mask, token_type_ids])"),Ce.forEach(t),J.forEach(t),ne=d(L),O=s(L,"LI",{});var de=r(O);le=i(de,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=s(de,"CODE",{});var ve=r(Q);ke=i(ve,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ve.forEach(t),de.forEach(t),L.forEach(t)},m(u,E){h(u,p,E),e(p,R),h(u,m,E),h(u,b,E),e(b,k),e(k,_),e(b,f),e(b,M),e(M,Y),h(u,I,E),h(u,z,E),e(z,X),e(z,D),e(D,te),e(z,me),e(z,S),e(S,ge),e(z,pe),h(u,K,E),h(u,A,E),e(A,oe),h(u,Z,E),h(u,x,E),e(x,P),e(P,se),e(P,U),e(U,he),e(P,re),e(P,H),e(H,ue),e(x,ae),e(x,C),e(C,_e),e(C,W),e(W,ie),e(C,be),e(C,B),e(B,G),e(x,ne),e(x,O),e(O,le),e(O,Q),e(Q,ke)},d(u){u&&t(p),u&&t(m),u&&t(b),u&&t(I),u&&t(z),u&&t(K),u&&t(A),u&&t(Z),u&&t(x)}}}function jz(q){let p,R,m,b,k;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),b=a("Module"),k=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(_){p=s(_,"P",{});var f=r(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(f,"CODE",{});var M=r(m);b=i(M,"Module"),M.forEach(t),k=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(t)},m(_,f){h(_,p,f),e(p,R),e(p,m),e(m,b),e(p,k)},d(_){_&&t(p)}}}function Lz(q){let p,R,m,b,k,_,f,M,Y,I,z,X,D,te,me,S,ge,pe,K,A,oe,Z,x,P,se,U,he,re,H,ue,ae,C,_e,W,ie,be,B,G,ne,O,le,Q,ke;return{c(){p=n("p"),R=a("TF 2.0 models accepts two formats as inputs:"),m=l(),b=n("ul"),k=n("li"),_=a("having all inputs as keyword arguments (like PyTorch models), or"),f=l(),M=n("li"),Y=a("having all inputs as a list, tuple or dict in the first positional arguments."),I=l(),z=n("p"),X=a("This second option is useful when using "),D=n("code"),te=a("tf.keras.Model.fit"),me=a(` method which currently requires having all the
tensors in the first argument of the model call function: `),S=n("code"),ge=a("model(inputs)"),pe=a("."),K=l(),A=n("p"),oe=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 :`),Z=l(),x=n("ul"),P=n("li"),se=a("a single Tensor with "),U=n("code"),he=a("input_ids"),re=a(" only and nothing else: "),H=n("code"),ue=a("model(inputs_ids)"),ae=l(),C=n("li"),_e=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=n("code"),ie=a("model([input_ids, attention_mask])"),be=a(" or "),B=n("code"),G=a("model([input_ids, attention_mask, token_type_ids])"),ne=l(),O=n("li"),le=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=n("code"),ke=a('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(u){p=s(u,"P",{});var E=r(p);R=i(E,"TF 2.0 models accepts two formats as inputs:"),E.forEach(t),m=d(u),b=s(u,"UL",{});var ee=r(b);k=s(ee,"LI",{});var Me=r(k);_=i(Me,"having all inputs as keyword arguments (like PyTorch models), or"),Me.forEach(t),f=d(ee),M=s(ee,"LI",{});var ce=r(M);Y=i(ce,"having all inputs as a list, tuple or dict in the first positional arguments."),ce.forEach(t),ee.forEach(t),I=d(u),z=s(u,"P",{});var N=r(z);X=i(N,"This second option is useful when using "),D=s(N,"CODE",{});var $e=r(D);te=i($e,"tf.keras.Model.fit"),$e.forEach(t),me=i(N,` method which currently requires having all the
tensors in the first argument of the model call function: `),S=s(N,"CODE",{});var Ee=r(S);ge=i(Ee,"model(inputs)"),Ee.forEach(t),pe=i(N,"."),N.forEach(t),K=d(u),A=s(u,"P",{});var ze=r(A);oe=i(ze,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),ze.forEach(t),Z=d(u),x=s(u,"UL",{});var L=r(x);P=s(L,"LI",{});var V=r(P);se=i(V,"a single Tensor with "),U=s(V,"CODE",{});var xe=r(U);he=i(xe,"input_ids"),xe.forEach(t),re=i(V," only and nothing else: "),H=s(V,"CODE",{});var Fe=r(H);ue=i(Fe,"model(inputs_ids)"),Fe.forEach(t),V.forEach(t),ae=d(L),C=s(L,"LI",{});var J=r(C);_e=i(J,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=s(J,"CODE",{});var qe=r(W);ie=i(qe,"model([input_ids, attention_mask])"),qe.forEach(t),be=i(J," or "),B=s(J,"CODE",{});var Ce=r(B);G=i(Ce,"model([input_ids, attention_mask, token_type_ids])"),Ce.forEach(t),J.forEach(t),ne=d(L),O=s(L,"LI",{});var de=r(O);le=i(de,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=s(de,"CODE",{});var ve=r(Q);ke=i(ve,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ve.forEach(t),de.forEach(t),L.forEach(t)},m(u,E){h(u,p,E),e(p,R),h(u,m,E),h(u,b,E),e(b,k),e(k,_),e(b,f),e(b,M),e(M,Y),h(u,I,E),h(u,z,E),e(z,X),e(z,D),e(D,te),e(z,me),e(z,S),e(S,ge),e(z,pe),h(u,K,E),h(u,A,E),e(A,oe),h(u,Z,E),h(u,x,E),e(x,P),e(P,se),e(P,U),e(U,he),e(P,re),e(P,H),e(H,ue),e(x,ae),e(x,C),e(C,_e),e(C,W),e(W,ie),e(C,be),e(C,B),e(B,G),e(x,ne),e(x,O),e(O,le),e(O,Q),e(Q,ke)},d(u){u&&t(p),u&&t(m),u&&t(b),u&&t(I),u&&t(z),u&&t(K),u&&t(A),u&&t(Z),u&&t(x)}}}function Az(q){let p,R,m,b,k;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),b=a("Module"),k=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(_){p=s(_,"P",{});var f=r(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(f,"CODE",{});var M=r(m);b=i(M,"Module"),M.forEach(t),k=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(t)},m(_,f){h(_,p,f),e(p,R),e(p,m),e(m,b),e(p,k)},d(_){_&&t(p)}}}function Oz(q){let p,R,m,b,k,_,f,M,Y,I,z,X,D,te,me,S,ge,pe,K,A,oe,Z,x,P,se,U,he,re,H,ue,ae,C,_e,W,ie,be,B,G,ne,O,le,Q,ke;return{c(){p=n("p"),R=a("TF 2.0 models accepts two formats as inputs:"),m=l(),b=n("ul"),k=n("li"),_=a("having all inputs as keyword arguments (like PyTorch models), or"),f=l(),M=n("li"),Y=a("having all inputs as a list, tuple or dict in the first positional arguments."),I=l(),z=n("p"),X=a("This second option is useful when using "),D=n("code"),te=a("tf.keras.Model.fit"),me=a(` method which currently requires having all the
tensors in the first argument of the model call function: `),S=n("code"),ge=a("model(inputs)"),pe=a("."),K=l(),A=n("p"),oe=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 :`),Z=l(),x=n("ul"),P=n("li"),se=a("a single Tensor with "),U=n("code"),he=a("input_ids"),re=a(" only and nothing else: "),H=n("code"),ue=a("model(inputs_ids)"),ae=l(),C=n("li"),_e=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=n("code"),ie=a("model([input_ids, attention_mask])"),be=a(" or "),B=n("code"),G=a("model([input_ids, attention_mask, token_type_ids])"),ne=l(),O=n("li"),le=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=n("code"),ke=a('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(u){p=s(u,"P",{});var E=r(p);R=i(E,"TF 2.0 models accepts two formats as inputs:"),E.forEach(t),m=d(u),b=s(u,"UL",{});var ee=r(b);k=s(ee,"LI",{});var Me=r(k);_=i(Me,"having all inputs as keyword arguments (like PyTorch models), or"),Me.forEach(t),f=d(ee),M=s(ee,"LI",{});var ce=r(M);Y=i(ce,"having all inputs as a list, tuple or dict in the first positional arguments."),ce.forEach(t),ee.forEach(t),I=d(u),z=s(u,"P",{});var N=r(z);X=i(N,"This second option is useful when using "),D=s(N,"CODE",{});var $e=r(D);te=i($e,"tf.keras.Model.fit"),$e.forEach(t),me=i(N,` method which currently requires having all the
tensors in the first argument of the model call function: `),S=s(N,"CODE",{});var Ee=r(S);ge=i(Ee,"model(inputs)"),Ee.forEach(t),pe=i(N,"."),N.forEach(t),K=d(u),A=s(u,"P",{});var ze=r(A);oe=i(ze,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),ze.forEach(t),Z=d(u),x=s(u,"UL",{});var L=r(x);P=s(L,"LI",{});var V=r(P);se=i(V,"a single Tensor with "),U=s(V,"CODE",{});var xe=r(U);he=i(xe,"input_ids"),xe.forEach(t),re=i(V," only and nothing else: "),H=s(V,"CODE",{});var Fe=r(H);ue=i(Fe,"model(inputs_ids)"),Fe.forEach(t),V.forEach(t),ae=d(L),C=s(L,"LI",{});var J=r(C);_e=i(J,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=s(J,"CODE",{});var qe=r(W);ie=i(qe,"model([input_ids, attention_mask])"),qe.forEach(t),be=i(J," or "),B=s(J,"CODE",{});var Ce=r(B);G=i(Ce,"model([input_ids, attention_mask, token_type_ids])"),Ce.forEach(t),J.forEach(t),ne=d(L),O=s(L,"LI",{});var de=r(O);le=i(de,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=s(de,"CODE",{});var ve=r(Q);ke=i(ve,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ve.forEach(t),de.forEach(t),L.forEach(t)},m(u,E){h(u,p,E),e(p,R),h(u,m,E),h(u,b,E),e(b,k),e(k,_),e(b,f),e(b,M),e(M,Y),h(u,I,E),h(u,z,E),e(z,X),e(z,D),e(D,te),e(z,me),e(z,S),e(S,ge),e(z,pe),h(u,K,E),h(u,A,E),e(A,oe),h(u,Z,E),h(u,x,E),e(x,P),e(P,se),e(P,U),e(U,he),e(P,re),e(P,H),e(H,ue),e(x,ae),e(x,C),e(C,_e),e(C,W),e(W,ie),e(C,be),e(C,B),e(B,G),e(x,ne),e(x,O),e(O,le),e(O,Q),e(Q,ke)},d(u){u&&t(p),u&&t(m),u&&t(b),u&&t(I),u&&t(z),u&&t(K),u&&t(A),u&&t(Z),u&&t(x)}}}function Nz(q){let p,R,m,b,k;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),b=a("Module"),k=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(_){p=s(_,"P",{});var f=r(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(f,"CODE",{});var M=r(m);b=i(M,"Module"),M.forEach(t),k=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(t)},m(_,f){h(_,p,f),e(p,R),e(p,m),e(m,b),e(p,k)},d(_){_&&t(p)}}}function Iz(q){let p,R,m,b,k;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),b=a("Module"),k=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(_){p=s(_,"P",{});var f=r(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(f,"CODE",{});var M=r(m);b=i(M,"Module"),M.forEach(t),k=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(t)},m(_,f){h(_,p,f),e(p,R),e(p,m),e(m,b),e(p,k)},d(_){_&&t(p)}}}function Dz(q){let p,R,m,b,k;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),b=a("Module"),k=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(_){p=s(_,"P",{});var f=r(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(f,"CODE",{});var M=r(m);b=i(M,"Module"),M.forEach(t),k=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(t)},m(_,f){h(_,p,f),e(p,R),e(p,m),e(m,b),e(p,k)},d(_){_&&t(p)}}}function Sz(q){let p,R,m,b,k;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),b=a("Module"),k=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(_){p=s(_,"P",{});var f=r(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(f,"CODE",{});var M=r(m);b=i(M,"Module"),M.forEach(t),k=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(t)},m(_,f){h(_,p,f),e(p,R),e(p,m),e(m,b),e(p,k)},d(_){_&&t(p)}}}function Wz(q){let p,R,m,b,k;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),b=a("Module"),k=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(_){p=s(_,"P",{});var f=r(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(f,"CODE",{});var M=r(m);b=i(M,"Module"),M.forEach(t),k=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(t)},m(_,f){h(_,p,f),e(p,R),e(p,m),e(m,b),e(p,k)},d(_){_&&t(p)}}}function Bz(q){let p,R,m,b,k;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),b=a("Module"),k=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(_){p=s(_,"P",{});var f=r(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(f,"CODE",{});var M=r(m);b=i(M,"Module"),M.forEach(t),k=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(t)},m(_,f){h(_,p,f),e(p,R),e(p,m),e(m,b),e(p,k)},d(_){_&&t(p)}}}function Uz(q){let p,R,m,b,k;return{c(){p=n("p"),R=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),b=a("Module"),k=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(_){p=s(_,"P",{});var f=r(p);R=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(f,"CODE",{});var M=r(m);b=i(M,"Module"),M.forEach(t),k=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(t)},m(_,f){h(_,p,f),e(p,R),e(p,m),e(m,b),e(p,k)},d(_){_&&t(p)}}}function Hz(q){let p,R,m,b,k,_,f,M,Y,I,z,X,D,te,me,S,ge,pe,K,A,oe,Z,x,P,se,U,he,re,H,ue,ae,C,_e,W,ie,be,B,G,ne,O,le,Q,ke,u,E,ee,Me,ce,N,$e,Ee,ze,L,V,xe,Fe,J,qe,Ce,de,ve,dm,cm,Qh,Qt,pm,$s,hm,um,Fs,fm,mm,Vh,To,bn,vd,Rs,gm,wd,_m,Jh,We,Ms,bm,yo,km,nl,Tm,ym,sl,vm,wm,$m,vo,Fm,rl,Rm,Mm,al,Em,zm,xm,wo,qm,il,Cm,Pm,ll,jm,Lm,Am,$d,Om,Nm,Es,Kh,$o,kn,Fd,zs,Im,Rd,Dm,Gh,Te,xs,Sm,Md,Wm,Bm,Ed,Um,Hm,qs,Qm,Cs,Vm,zd,Jm,Km,Gm,Tn,Xm,Ps,Ym,dl,Zm,eg,tg,Vt,js,og,xd,ng,sg,Ls,cl,rg,qd,ag,ig,pl,lg,Cd,dg,cg,yn,As,pg,Os,hg,Pd,ug,fg,mg,vn,Ns,gg,jd,_g,bg,hl,Is,Xh,Fo,wn,Ld,Ds,kg,Ad,Tg,Yh,Pe,Ss,yg,Ws,vg,Od,wg,$g,Fg,Nd,Rg,Mg,Bs,Eg,Us,zg,Id,xg,qg,Cg,$n,Pg,Hs,jg,ul,Lg,Ag,Og,fl,Qs,Zh,Ro,Fn,Dd,Vs,Ng,Sd,Ig,eu,je,Js,Dg,Wd,Sg,Wg,Ks,Bg,ml,Ug,Hg,Qg,Gs,Vg,Xs,Jg,Kg,Gg,Ys,Xg,Bd,Yg,Zg,e_,Be,t_,Ud,o_,n_,Hd,s_,r_,Qd,a_,i_,Vd,l_,d_,Jd,c_,p_,Kd,h_,u_,f_,Rn,m_,Gd,g_,__,Zs,b_,k_,st,er,T_,Mo,y_,gl,v_,w_,Xd,$_,F_,R_,Mn,M_,Yd,E_,z_,tr,tu,Eo,En,Zd,or,x_,ec,q_,ou,Ye,nr,C_,sr,P_,tc,j_,L_,A_,rr,O_,_l,N_,I_,D_,ar,S_,ir,W_,B_,U_,rt,lr,H_,zo,Q_,bl,V_,J_,oc,K_,G_,X_,zn,Y_,nc,Z_,eb,dr,nu,xo,xn,sc,cr,tb,rc,ob,su,Ze,pr,nb,hr,sb,ac,rb,ab,ib,ur,lb,kl,db,cb,pb,fr,hb,mr,ub,fb,mb,at,gr,gb,qo,_b,Tl,bb,kb,ic,Tb,yb,vb,qn,wb,lc,$b,Fb,_r,ru,Co,Cn,dc,br,Rb,cc,Mb,au,et,kr,Eb,pc,zb,xb,Tr,qb,yl,Cb,Pb,jb,yr,Lb,vr,Ab,Ob,Nb,Se,wr,Ib,Po,Db,vl,Sb,Wb,hc,Bb,Ub,Hb,Pn,Qb,uc,Vb,Jb,$r,Kb,fc,Gb,Xb,Fr,iu,jo,jn,mc,Rr,Yb,gc,Zb,lu,tt,Mr,ek,_c,tk,ok,Er,nk,wl,sk,rk,ak,zr,ik,xr,lk,dk,ck,it,qr,pk,Lo,hk,$l,uk,fk,bc,mk,gk,_k,Ln,bk,kc,kk,Tk,Cr,du,Ao,An,Tc,Pr,yk,yc,vk,cu,ot,jr,wk,vc,$k,Fk,Lr,Rk,Fl,Mk,Ek,zk,Ar,xk,Or,qk,Ck,Pk,lt,Nr,jk,Oo,Lk,Rl,Ak,Ok,wc,Nk,Ik,Dk,On,Sk,$c,Wk,Bk,Ir,pu,No,Nn,Fc,Dr,Uk,Rc,Hk,hu,nt,Sr,Qk,Io,Vk,Mc,Jk,Kk,Ec,Gk,Xk,Yk,Wr,Zk,Ml,eT,tT,oT,Br,nT,Ur,sT,rT,aT,dt,Hr,iT,Do,lT,El,dT,cT,zc,pT,hT,uT,In,fT,xc,mT,gT,Qr,uu,So,Dn,qc,Vr,_T,Cc,bT,fu,Ue,Jr,kT,Pc,TT,yT,Kr,vT,zl,wT,$T,FT,Gr,RT,Xr,MT,ET,zT,Sn,xT,ct,Yr,qT,Wo,CT,xl,PT,jT,jc,LT,AT,OT,Wn,NT,Lc,IT,DT,Zr,mu,Bo,Bn,Ac,ea,ST,Oc,WT,gu,Uo,ta,BT,pt,oa,UT,Ho,HT,ql,QT,VT,Nc,JT,KT,GT,Un,XT,Ic,YT,ZT,na,_u,Qo,Hn,Dc,sa,ey,Sc,ty,bu,He,ra,oy,aa,ny,Wc,sy,ry,ay,ia,iy,Cl,ly,dy,cy,la,py,da,hy,uy,fy,Qn,my,ht,ca,gy,Vo,_y,Pl,by,ky,Bc,Ty,yy,vy,Vn,wy,Uc,$y,Fy,pa,ku,Jo,Jn,Hc,ha,Ry,Qc,My,Tu,Qe,ua,Ey,Vc,zy,xy,fa,qy,jl,Cy,Py,jy,ma,Ly,ga,Ay,Oy,Ny,Kn,Iy,ut,_a,Dy,Ko,Sy,Ll,Wy,By,Jc,Uy,Hy,Qy,Gn,Vy,Kc,Jy,Ky,ba,yu,Go,Xn,Gc,ka,Gy,Xc,Xy,vu,Ve,Ta,Yy,Yc,Zy,ev,ya,tv,Al,ov,nv,sv,va,rv,wa,av,iv,lv,Yn,dv,ft,$a,cv,Xo,pv,Ol,hv,uv,Zc,fv,mv,gv,Zn,_v,ep,bv,kv,Fa,wu,Yo,es,tp,Ra,Tv,op,yv,$u,Je,Ma,vv,np,wv,$v,Ea,Fv,Nl,Rv,Mv,Ev,za,zv,xa,xv,qv,Cv,ts,Pv,mt,qa,jv,Zo,Lv,Il,Av,Ov,sp,Nv,Iv,Dv,os,Sv,rp,Wv,Bv,Ca,Fu,en,ns,ap,Pa,Uv,ip,Hv,Ru,Ke,ja,Qv,tn,Vv,lp,Jv,Kv,dp,Gv,Xv,Yv,La,Zv,Dl,e1,t1,o1,Aa,n1,Oa,s1,r1,a1,ss,i1,gt,Na,l1,on,d1,Sl,c1,p1,cp,h1,u1,f1,rs,m1,pp,g1,_1,Ia,Mu,nn,as,hp,Da,b1,up,k1,Eu,Le,Sa,T1,fp,y1,v1,Wa,w1,Wl,$1,F1,R1,Ba,M1,Ua,E1,z1,x1,mp,q1,C1,Nt,gp,Ha,P1,j1,_p,Qa,L1,A1,bp,Va,O1,N1,kp,Ja,I1,D1,_t,Ka,S1,sn,W1,Tp,B1,U1,yp,H1,Q1,V1,is,J1,vp,K1,G1,Ga,zu,rn,ls,wp,Xa,X1,$p,Y1,xu,Ae,Ya,Z1,Za,ew,Fp,tw,ow,nw,ei,sw,Bl,rw,aw,iw,ti,lw,oi,dw,cw,pw,Rp,hw,uw,It,Mp,ni,fw,mw,Ep,si,gw,_w,zp,ri,bw,kw,xp,ai,Tw,yw,bt,ii,vw,an,ww,qp,$w,Fw,Cp,Rw,Mw,Ew,ds,zw,Pp,xw,qw,li,qu,ln,cs,jp,di,Cw,Lp,Pw,Cu,Oe,ci,jw,Ap,Lw,Aw,pi,Ow,Ul,Nw,Iw,Dw,hi,Sw,ui,Ww,Bw,Uw,Op,Hw,Qw,Dt,Np,fi,Vw,Jw,Ip,mi,Kw,Gw,Dp,gi,Xw,Yw,Sp,_i,Zw,e$,kt,bi,t$,dn,o$,Wp,n$,s$,Bp,r$,a$,i$,ps,l$,Up,d$,c$,ki,Pu,cn,hs,Hp,Ti,p$,Qp,h$,ju,Ne,yi,u$,Vp,f$,m$,vi,g$,Hl,_$,b$,k$,wi,T$,$i,y$,v$,w$,Jp,$$,F$,St,Kp,Fi,R$,M$,Gp,Ri,E$,z$,Xp,Mi,x$,q$,Yp,Ei,C$,P$,Tt,zi,j$,pn,L$,Zp,A$,O$,eh,N$,I$,D$,us,S$,th,W$,B$,xi,Lu,hn,fs,oh,qi,U$,nh,H$,Au,Ie,Ci,Q$,sh,V$,J$,Pi,K$,Ql,G$,X$,Y$,ji,Z$,Li,eF,tF,oF,rh,nF,sF,Wt,ah,Ai,rF,aF,ih,Oi,iF,lF,lh,Ni,dF,cF,dh,Ii,pF,hF,yt,Di,uF,un,fF,ch,mF,gF,ph,_F,bF,kF,ms,TF,hh,yF,vF,Si,Ou,fn,gs,uh,Wi,wF,fh,$F,Nu,De,Bi,FF,mn,RF,mh,MF,EF,gh,zF,xF,qF,Ui,CF,Vl,PF,jF,LF,Hi,AF,Qi,OF,NF,IF,_h,DF,SF,Bt,bh,Vi,WF,BF,kh,Ji,UF,HF,Th,Ki,QF,VF,yh,Gi,JF,KF,vt,Xi,GF,gn,XF,vh,YF,ZF,wh,e2,t2,o2,_s,n2,$h,s2,r2,Yi,Iu;return _=new ye({}),te=new ye({}),Rs=new ye({}),Ms=new j({props:{name:"class transformers.RobertaConfig",anchor:"transformers.RobertaConfig",parameters:[{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/configuration_roberta.py#L37"}}),Es=new we({props:{code:`from transformers import RobertaConfig, RobertaModel

# Initializing a RoBERTa configuration
configuration = RobertaConfig()

# Initializing a model from the configuration
model = RobertaModel(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> RobertaConfig, RobertaModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a RoBERTa configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = RobertaConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaModel(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`}}),zs=new ye({}),xs=new j({props:{name:"class transformers.RobertaTokenizer",anchor:"transformers.RobertaTokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"errors",val:" = 'replace'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"add_prefix_space",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/tokenization_roberta.py#L103",parametersDescription:[{anchor:"transformers.RobertaTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.RobertaTokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.RobertaTokenizer.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.RobertaTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

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

					</div>`,name:"eos_token"},{anchor:"transformers.RobertaTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&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.RobertaTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&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.RobertaTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.RobertaTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.RobertaTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&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.RobertaTokenizer.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word. (RoBERTa tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"}]}}),qs=new we({props:{code:`from transformers import RobertaTokenizer
tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
tokenizer("Hello world")['input_ids']
tokenizer(" Hello world")['input_ids']`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RobertaTokenizer</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[0, 31414, 232, 328, 2]
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[0, 20920, 232, 2]`}}),Tn=new fe({props:{$$slots:{default:[_z]},$$scope:{ctx:q}}}),js=new j({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.RobertaTokenizer.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/roberta/tokenization_roberta.py#L340",parametersDescription:[{anchor:"transformers.RobertaTokenizer.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.RobertaTokenizer.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>
`}}),As=new j({props:{name:"get_special_tokens_mask",anchor:"transformers.RobertaTokenizer.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/roberta/tokenization_roberta.py#L365",parametersDescription:[{anchor:"transformers.RobertaTokenizer.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.RobertaTokenizer.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.RobertaTokenizer.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>
`}}),Ns=new j({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.RobertaTokenizer.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/roberta/tokenization_roberta.py#L392",parametersDescription:[{anchor:"transformers.RobertaTokenizer.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.RobertaTokenizer.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 zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Is=new j({props:{name:"save_vocabulary",anchor:"transformers.RobertaTokenizer.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/roberta/tokenization_roberta.py#L311"}}),Ds=new ye({}),Ss=new j({props:{name:"class transformers.RobertaTokenizerFast",anchor:"transformers.RobertaTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"merges_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"errors",val:" = 'replace'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"add_prefix_space",val:" = False"},{name:"trim_offsets",val:" = True"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/tokenization_roberta_fast.py#L68",parametersDescription:[{anchor:"transformers.RobertaTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.RobertaTokenizerFast.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.RobertaTokenizerFast.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.RobertaTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

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

					</div>`,name:"eos_token"},{anchor:"transformers.RobertaTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&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.RobertaTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&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.RobertaTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.RobertaTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.RobertaTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&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.RobertaTokenizerFast.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word. (RoBERTa tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"},{anchor:"transformers.RobertaTokenizerFast.trim_offsets",description:`<strong>trim_offsets</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the post processing step should trim offsets to avoid including whitespaces.`,name:"trim_offsets"}]}}),Bs=new we({props:{code:`from transformers import RobertaTokenizerFast
tokenizer = RobertaTokenizerFast.from_pretrained("roberta-base")
tokenizer("Hello world")['input_ids']
tokenizer(" Hello world")['input_ids']`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RobertaTokenizerFast</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer = RobertaTokenizerFast.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[0, 31414, 232, 328, 2]
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[0, 20920, 232, 2]`}}),$n=new fe({props:{$$slots:{default:[bz]},$$scope:{ctx:q}}}),Qs=new j({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.RobertaTokenizerFast.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/roberta/tokenization_roberta_fast.py#L270"}}),Vs=new ye({}),Js=new j({props:{name:"class transformers.RobertaModel",anchor:"transformers.RobertaModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_roberta.py#L696",parametersDescription:[{anchor:"transformers.RobertaModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</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"}]}}),er=new j({props:{name:"forward",anchor:"transformers.RobertaModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_roberta.py#L741",parametersDescription:[{anchor:"transformers.RobertaModel.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/roberta#transformers.RobertaTokenizer">RobertaTokenizer</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.RobertaModel.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.RobertaModel.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.RobertaModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaModel.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.RobertaModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaModel.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.RobertaModel.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.RobertaModel.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.RobertaModel.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.RobertaModel.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.RobertaModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.RobertaModel.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.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</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/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</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>
<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>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Mn=new fe({props:{$$slots:{default:[kz]},$$scope:{ctx:q}}}),tr=new we({props:{code:`from transformers import RobertaTokenizer, RobertaModel
import torch

tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
model = RobertaModel.from_pretrained("roberta-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> RobertaTokenizer, RobertaModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaModel.from_pretrained(<span class="hljs-string">&quot;roberta-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`}}),or=new ye({}),nr=new j({props:{name:"class transformers.RobertaForCausalLM",anchor:"transformers.RobertaForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_roberta.py#L882",parametersDescription:[{anchor:"transformers.RobertaForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</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"}]}}),lr=new j({props:{name:"forward",anchor:"transformers.RobertaForCausalLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Tuple[typing.Tuple[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_roberta.py#L908",parametersDescription:[{anchor:"transformers.RobertaForCausalLM.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/roberta#transformers.RobertaTokenizer">RobertaTokenizer</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.RobertaForCausalLM.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.RobertaForCausalLM.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.RobertaForCausalLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaForCausalLM.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.RobertaForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaForCausalLM.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.RobertaForCausalLM.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.RobertaForCausalLM.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.RobertaForCausalLM.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.RobertaForCausalLM.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.RobertaForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the left-to-right language modeling loss (next word prediction). Indices should be in
<code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are
ignored (masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.RobertaForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.RobertaForCausalLM.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/roberta#transformers.RobertaConfig"
>RobertaConfig</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>
`}}),zn=new fe({props:{$$slots:{default:[Tz]},$$scope:{ctx:q}}}),dr=new we({props:{code:`from transformers import RobertaTokenizer, RobertaForCausalLM, RobertaConfig
import torch

tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
config = RobertaConfig.from_pretrained("roberta-base")
config.is_decoder = True
model = RobertaForCausalLM.from_pretrained("roberta-base", config=config)

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

prediction_logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RobertaTokenizer, RobertaForCausalLM, RobertaConfig
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config = RobertaConfig.from_pretrained(<span class="hljs-string">&quot;roberta-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 = RobertaForCausalLM.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>, config=config)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>prediction_logits = outputs.logits`}}),cr=new ye({}),pr=new j({props:{name:"class transformers.RobertaForMaskedLM",anchor:"transformers.RobertaForMaskedLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_roberta.py#L1034",parametersDescription:[{anchor:"transformers.RobertaForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</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"}]}}),gr=new j({props:{name:"forward",anchor:"transformers.RobertaForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = 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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_roberta.py#L1063",parametersDescription:[{anchor:"transformers.RobertaForMaskedLM.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/roberta#transformers.RobertaTokenizer">RobertaTokenizer</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.RobertaForMaskedLM.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.RobertaForMaskedLM.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.RobertaForMaskedLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaForMaskedLM.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.RobertaForMaskedLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaForMaskedLM.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.RobertaForMaskedLM.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.RobertaForMaskedLM.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.RobertaForMaskedLM.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"},{anchor:"transformers.RobertaForMaskedLM.forward.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, any]</code>, optional, defaults to <em>{}</em>) &#x2014;
Used to hide legacy arguments that have been deprecated.`,name:"kwargs"}],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/roberta#transformers.RobertaConfig"
>RobertaConfig</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>
`}}),qn=new fe({props:{$$slots:{default:[yz]},$$scope:{ctx:q}}}),_r=new we({props:{code:`from transformers import RobertaTokenizer, RobertaForMaskedLM
import torch

tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
model = RobertaForMaskedLM.from_pretrained("roberta-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> RobertaTokenizer, RobertaForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaForMaskedLM.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is &lt;mask&gt;.&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`}}),br=new ye({}),kr=new j({props:{name:"class transformers.RobertaForSequenceClassification",anchor:"transformers.RobertaForSequenceClassification",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_roberta.py#L1163",parametersDescription:[{anchor:"transformers.RobertaForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</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"}]}}),wr=new j({props:{name:"forward",anchor:"transformers.RobertaForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = 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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_roberta.py#L1177",parametersDescription:[{anchor:"transformers.RobertaForSequenceClassification.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/roberta#transformers.RobertaTokenizer">RobertaTokenizer</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.RobertaForSequenceClassification.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.RobertaForSequenceClassification.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.RobertaForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaForSequenceClassification.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.RobertaForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaForSequenceClassification.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.RobertaForSequenceClassification.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.RobertaForSequenceClassification.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.RobertaForSequenceClassification.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/roberta#transformers.RobertaConfig"
>RobertaConfig</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>
`}}),Pn=new fe({props:{$$slots:{default:[vz]},$$scope:{ctx:q}}}),$r=new we({props:{code:`import torch
from transformers import RobertaTokenizer, RobertaForSequenceClassification

torch.manual_seed(0)
tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
model = RobertaForSequenceClassification.from_pretrained("roberta-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> RobertaTokenizer, RobertaForSequenceClassification

<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 = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;roberta-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)
`}}),Fr=new we({props:{code:`import torch
from transformers import RobertaTokenizer, RobertaForSequenceClassification

torch.manual_seed(0)
tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
model = RobertaForSequenceClassification.from_pretrained("roberta-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> RobertaTokenizer, RobertaForSequenceClassification

<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 = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;roberta-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)
`}}),Rr=new ye({}),Mr=new j({props:{name:"class transformers.RobertaForMultipleChoice",anchor:"transformers.RobertaForMultipleChoice",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_roberta.py#L1261",parametersDescription:[{anchor:"transformers.RobertaForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</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"}]}}),qr=new j({props:{name:"forward",anchor:"transformers.RobertaForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = 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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_roberta.py#L1274",parametersDescription:[{anchor:"transformers.RobertaForMultipleChoice.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/roberta#transformers.RobertaTokenizer">RobertaTokenizer</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.RobertaForMultipleChoice.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.RobertaForMultipleChoice.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.RobertaForMultipleChoice.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaForMultipleChoice.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.RobertaForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaForMultipleChoice.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.RobertaForMultipleChoice.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.RobertaForMultipleChoice.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.RobertaForMultipleChoice.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/roberta#transformers.RobertaConfig"
>RobertaConfig</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>
`}}),Ln=new fe({props:{$$slots:{default:[wz]},$$scope:{ctx:q}}}),Cr=new we({props:{code:`from transformers import RobertaTokenizer, RobertaForMultipleChoice
import torch

tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
model = RobertaForMultipleChoice.from_pretrained("roberta-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> RobertaTokenizer, RobertaForMultipleChoice
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;roberta-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`}}),Pr=new ye({}),jr=new j({props:{name:"class transformers.RobertaForTokenClassification",anchor:"transformers.RobertaForTokenClassification",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_roberta.py#L1354",parametersDescription:[{anchor:"transformers.RobertaForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</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"}]}}),Nr=new j({props:{name:"forward",anchor:"transformers.RobertaForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = 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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_roberta.py#L1372",parametersDescription:[{anchor:"transformers.RobertaForTokenClassification.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/roberta#transformers.RobertaTokenizer">RobertaTokenizer</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.RobertaForTokenClassification.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.RobertaForTokenClassification.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.RobertaForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaForTokenClassification.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.RobertaForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaForTokenClassification.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.RobertaForTokenClassification.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.RobertaForTokenClassification.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.RobertaForTokenClassification.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/roberta#transformers.RobertaConfig"
>RobertaConfig</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>
`}}),On=new fe({props:{$$slots:{default:[$z]},$$scope:{ctx:q}}}),Ir=new we({props:{code:`from transformers import RobertaTokenizer, RobertaForTokenClassification
import torch

tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
model = RobertaForTokenClassification.from_pretrained("roberta-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> RobertaTokenizer, RobertaForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaForTokenClassification.from_pretrained(<span class="hljs-string">&quot;roberta-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`}}),Dr=new ye({}),Sr=new j({props:{name:"class transformers.RobertaForQuestionAnswering",anchor:"transformers.RobertaForQuestionAnswering",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_roberta.py#L1461",parametersDescription:[{anchor:"transformers.RobertaForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</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"}]}}),Hr=new j({props:{name:"forward",anchor:"transformers.RobertaForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_positions",val:": typing.Optional[torch.LongTensor] = 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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_roberta.py#L1475",parametersDescription:[{anchor:"transformers.RobertaForQuestionAnswering.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/roberta#transformers.RobertaTokenizer">RobertaTokenizer</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.RobertaForQuestionAnswering.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.RobertaForQuestionAnswering.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.RobertaForQuestionAnswering.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaForQuestionAnswering.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.RobertaForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaForQuestionAnswering.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.RobertaForQuestionAnswering.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.RobertaForQuestionAnswering.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.RobertaForQuestionAnswering.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.RobertaForQuestionAnswering.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/roberta#transformers.RobertaConfig"
>RobertaConfig</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>
`}}),In=new fe({props:{$$slots:{default:[Fz]},$$scope:{ctx:q}}}),Qr=new we({props:{code:`from transformers import RobertaTokenizer, RobertaForQuestionAnswering
import torch

torch.manual_seed(0)
tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
model = RobertaForQuestionAnswering.from_pretrained("roberta-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> RobertaTokenizer, RobertaForQuestionAnswering
<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 = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;roberta-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)
`}}),Vr=new ye({}),Jr=new j({props:{name:"class transformers.TFRobertaModel",anchor:"transformers.TFRobertaModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_tf_roberta.py#L910",parametersDescription:[{anchor:"transformers.TFRobertaModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),Sn=new fe({props:{$$slots:{default:[Rz]},$$scope:{ctx:q}}}),Yr=new j({props:{name:"call",anchor:"transformers.TFRobertaModel.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"encoder_hidden_states",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"encoder_attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"past_key_values",val:": typing.Union[typing.Tuple[typing.Tuple[typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor]]], NoneType] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"training",val:": typing.Optional[bool] = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_tf_roberta.py#L915",parametersDescription:[{anchor:"transformers.TFRobertaModel.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</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.TFRobertaModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</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.TFRobertaModel.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaModel.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaModel.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.TFRobertaModel.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.TFRobertaModel.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.TFRobertaModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaModel.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.TFRobertaModel.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.TFRobertaModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFRobertaModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you\u2019re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Wn=new fe({props:{$$slots:{default:[Mz]},$$scope:{ctx:q}}}),Zr=new we({props:{code:`from transformers import RobertaTokenizer, TFRobertaModel
import tensorflow as tf

tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
model = TFRobertaModel.from_pretrained("roberta-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> RobertaTokenizer, TFRobertaModel
<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 = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRobertaModel.from_pretrained(<span class="hljs-string">&quot;roberta-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`}}),ea=new ye({}),ta=new j({props:{name:"class transformers.TFRobertaForCausalLM",anchor:"transformers.TFRobertaForCausalLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_tf_roberta.py#L1138"}}),oa=new j({props:{name:"call",anchor:"transformers.TFRobertaForCausalLM.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"encoder_hidden_states",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"encoder_attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"past_key_values",val:": typing.Union[typing.Tuple[typing.Tuple[typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor]]], NoneType] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_tf_roberta.py#L1171",parametersDescription:[{anchor:"transformers.TFRobertaForCausalLM.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</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.TFRobertaForCausalLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaForCausalLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</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.TFRobertaForCausalLM.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaForCausalLM.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaForCausalLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaForCausalLM.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.TFRobertaForCausalLM.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.TFRobertaForCausalLM.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.TFRobertaForCausalLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaForCausalLM.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.TFRobertaForCausalLM.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.TFRobertaForCausalLM.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFRobertaForCausalLM.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"},{anchor:"transformers.TFRobertaForCausalLM.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 cross entropy classification loss. Indices should be in <code>[0, ..., config.vocab_size - 1]</code>.`,name:"labels"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Un=new fe({props:{$$slots:{default:[Ez]},$$scope:{ctx:q}}}),na=new we({props:{code:`from transformers import RobertaTokenizer, TFRobertaForCausalLM
import tensorflow as tf

tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
model = TFRobertaForCausalLM.from_pretrained("roberta-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> RobertaTokenizer, TFRobertaForCausalLM
<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 = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRobertaForCausalLM.from_pretrained(<span class="hljs-string">&quot;roberta-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`}}),sa=new ye({}),ra=new j({props:{name:"class transformers.TFRobertaForMaskedLM",anchor:"transformers.TFRobertaForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_tf_roberta.py#L1055",parametersDescription:[{anchor:"transformers.TFRobertaForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</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"}]}}),Qn=new fe({props:{$$slots:{default:[zz]},$$scope:{ctx:q}}}),ca=new j({props:{name:"call",anchor:"transformers.TFRobertaForMaskedLM.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_tf_roberta.py#L1072",parametersDescription:[{anchor:"transformers.TFRobertaForMaskedLM.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</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.TFRobertaForMaskedLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaForMaskedLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</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.TFRobertaForMaskedLM.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaForMaskedLM.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaForMaskedLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaForMaskedLM.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.TFRobertaForMaskedLM.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.TFRobertaForMaskedLM.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.TFRobertaForMaskedLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaForMaskedLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</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>
`}}),Vn=new fe({props:{$$slots:{default:[xz]},$$scope:{ctx:q}}}),pa=new we({props:{code:`from transformers import RobertaTokenizer, TFRobertaForMaskedLM
import tensorflow as tf

tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
model = TFRobertaForMaskedLM.from_pretrained("roberta-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> RobertaTokenizer, TFRobertaForMaskedLM
<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 = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRobertaForMaskedLM.from_pretrained(<span class="hljs-string">&quot;roberta-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`}}),ha=new ye({}),ua=new j({props:{name:"class transformers.TFRobertaForSequenceClassification",anchor:"transformers.TFRobertaForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_tf_roberta.py#L1319",parametersDescription:[{anchor:"transformers.TFRobertaForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),Kn=new fe({props:{$$slots:{default:[qz]},$$scope:{ctx:q}}}),_a=new j({props:{name:"call",anchor:"transformers.TFRobertaForSequenceClassification.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_tf_roberta.py#L1330",parametersDescription:[{anchor:"transformers.TFRobertaForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</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.TFRobertaForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</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.TFRobertaForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaForSequenceClassification.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.TFRobertaForSequenceClassification.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.TFRobertaForSequenceClassification.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.TFRobertaForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</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>
`}}),Gn=new fe({props:{$$slots:{default:[Cz]},$$scope:{ctx:q}}}),ba=new we({props:{code:`from transformers import RobertaTokenizer, TFRobertaForSequenceClassification
import tensorflow as tf

tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
model = TFRobertaForSequenceClassification.from_pretrained("roberta-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> RobertaTokenizer, TFRobertaForSequenceClassification
<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 = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRobertaForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;roberta-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`}}),ka=new ye({}),Ta=new j({props:{name:"class transformers.TFRobertaForMultipleChoice",anchor:"transformers.TFRobertaForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_tf_roberta.py#L1402",parametersDescription:[{anchor:"transformers.TFRobertaForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),Yn=new fe({props:{$$slots:{default:[Pz]},$$scope:{ctx:q}}}),$a=new j({props:{name:"call",anchor:"transformers.TFRobertaForMultipleChoice.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_tf_roberta.py#L1426",parametersDescription:[{anchor:"transformers.TFRobertaForMultipleChoice.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</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.TFRobertaForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaForMultipleChoice.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
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.TFRobertaForMultipleChoice.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaForMultipleChoice.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaForMultipleChoice.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.TFRobertaForMultipleChoice.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.TFRobertaForMultipleChoice.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.TFRobertaForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaForMultipleChoice.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices]</code>
where <code>num_choices</code> is the size of the second dimension of the input tensors. (See <code>input_ids</code> above)`,name:"labels"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</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>
`}}),Zn=new fe({props:{$$slots:{default:[jz]},$$scope:{ctx:q}}}),Fa=new we({props:{code:`from transformers import RobertaTokenizer, TFRobertaForMultipleChoice
import tensorflow as tf

tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
model = TFRobertaForMultipleChoice.from_pretrained("roberta-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> RobertaTokenizer, TFRobertaForMultipleChoice
<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 = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRobertaForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;roberta-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`}}),Ra=new ye({}),Ma=new j({props:{name:"class transformers.TFRobertaForTokenClassification",anchor:"transformers.TFRobertaForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_tf_roberta.py#L1524",parametersDescription:[{anchor:"transformers.TFRobertaForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),ts=new fe({props:{$$slots:{default:[Lz]},$$scope:{ctx:q}}}),qa=new j({props:{name:"call",anchor:"transformers.TFRobertaForTokenClassification.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_tf_roberta.py#L1542",parametersDescription:[{anchor:"transformers.TFRobertaForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</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.TFRobertaForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</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.TFRobertaForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaForTokenClassification.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.TFRobertaForTokenClassification.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.TFRobertaForTokenClassification.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.TFRobertaForTokenClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</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>
`}}),os=new fe({props:{$$slots:{default:[Az]},$$scope:{ctx:q}}}),Ca=new we({props:{code:`from transformers import RobertaTokenizer, TFRobertaForTokenClassification
import tensorflow as tf

tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
model = TFRobertaForTokenClassification.from_pretrained("roberta-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> RobertaTokenizer, TFRobertaForTokenClassification
<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 = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRobertaForTokenClassification.from_pretrained(<span class="hljs-string">&quot;roberta-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`}}),Pa=new ye({}),ja=new j({props:{name:"class transformers.TFRobertaForQuestionAnswering",anchor:"transformers.TFRobertaForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_tf_roberta.py#L1614",parametersDescription:[{anchor:"transformers.TFRobertaForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),ss=new fe({props:{$$slots:{default:[Oz]},$$scope:{ctx:q}}}),Na=new j({props:{name:"call",anchor:"transformers.TFRobertaForQuestionAnswering.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"start_positions",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"end_positions",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_tf_roberta.py#L1627",parametersDescription:[{anchor:"transformers.TFRobertaForQuestionAnswering.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</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.TFRobertaForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</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.TFRobertaForQuestionAnswering.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaForQuestionAnswering.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.TFRobertaForQuestionAnswering.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.TFRobertaForQuestionAnswering.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.TFRobertaForQuestionAnswering.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.TFRobertaForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig"
>RobertaConfig</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>
`}}),rs=new fe({props:{$$slots:{default:[Nz]},$$scope:{ctx:q}}}),Ia=new we({props:{code:`from transformers import RobertaTokenizer, TFRobertaForQuestionAnswering
import tensorflow as tf

tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
model = TFRobertaForQuestionAnswering.from_pretrained("roberta-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> RobertaTokenizer, TFRobertaForQuestionAnswering
<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 = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRobertaForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;roberta-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>])`}}),Da=new ye({}),Sa=new j({props:{name:"class transformers.FlaxRobertaModel",anchor:"transformers.FlaxRobertaModel",parameters:[{name:"config",val:": RobertaConfig"},{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/roberta/modeling_flax_roberta.py#L727",parametersDescription:[{anchor:"transformers.FlaxRobertaModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</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"}]}}),Ka=new j({props:{name:"__call__",anchor:"transformers.FlaxRobertaPreTrainedModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_flax_roberta.py#L609",parametersDescription:[{anchor:"transformers.FlaxRobertaPreTrainedModel.__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/bert#transformers.BertTokenizer">BertTokenizer</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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</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/roberta#transformers.RobertaConfig"
>RobertaConfig</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>pooler_output</strong> (<code>jnp.ndarray</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>
</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.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),is=new fe({props:{$$slots:{default:[Iz]},$$scope:{ctx:q}}}),Ga=new we({props:{code:`from transformers import RobertaTokenizer, FlaxRobertaModel

tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
model = FlaxRobertaModel.from_pretrained("roberta-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> RobertaTokenizer, FlaxRobertaModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRobertaModel.from_pretrained(<span class="hljs-string">&quot;roberta-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`}}),Xa=new ye({}),Ya=new j({props:{name:"class transformers.FlaxRobertaForMaskedLM",anchor:"transformers.FlaxRobertaForMaskedLM",parameters:[{name:"config",val:": RobertaConfig"},{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/roberta/modeling_flax_roberta.py#L789",parametersDescription:[{anchor:"transformers.FlaxRobertaForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</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"}]}}),ii=new j({props:{name:"__call__",anchor:"transformers.FlaxRobertaPreTrainedModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_flax_roberta.py#L609",parametersDescription:[{anchor:"transformers.FlaxRobertaPreTrainedModel.__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/bert#transformers.BertTokenizer">BertTokenizer</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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</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/roberta#transformers.RobertaConfig"
>RobertaConfig</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>pooler_output</strong> (<code>jnp.ndarray</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>
</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.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ds=new fe({props:{$$slots:{default:[Dz]},$$scope:{ctx:q}}}),li=new we({props:{code:`from transformers import RobertaTokenizer, FlaxRobertaForMaskedLM

tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
model = FlaxRobertaForMaskedLM.from_pretrained("roberta-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> RobertaTokenizer, FlaxRobertaForMaskedLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRobertaForMaskedLM.from_pretrained(<span class="hljs-string">&quot;roberta-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`}}),di=new ye({}),ci=new j({props:{name:"class transformers.FlaxRobertaForSequenceClassification",anchor:"transformers.FlaxRobertaForSequenceClassification",parameters:[{name:"config",val:": RobertaConfig"},{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/roberta/modeling_flax_roberta.py#L856",parametersDescription:[{anchor:"transformers.FlaxRobertaForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</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"}]}}),bi=new j({props:{name:"__call__",anchor:"transformers.FlaxRobertaPreTrainedModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_flax_roberta.py#L609",parametersDescription:[{anchor:"transformers.FlaxRobertaPreTrainedModel.__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/bert#transformers.BertTokenizer">BertTokenizer</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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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/roberta#transformers.RobertaConfig"
>RobertaConfig</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>
`}}),ps=new fe({props:{$$slots:{default:[Sz]},$$scope:{ctx:q}}}),ki=new we({props:{code:`from transformers import RobertaTokenizer, FlaxRobertaForSequenceClassification

tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
model = FlaxRobertaForSequenceClassification.from_pretrained("roberta-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> RobertaTokenizer, FlaxRobertaForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRobertaForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;roberta-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`}}),Ti=new ye({}),yi=new j({props:{name:"class transformers.FlaxRobertaForMultipleChoice",anchor:"transformers.FlaxRobertaForMultipleChoice",parameters:[{name:"config",val:": RobertaConfig"},{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/roberta/modeling_flax_roberta.py#L933",parametersDescription:[{anchor:"transformers.FlaxRobertaForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</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"}]}}),zi=new j({props:{name:"__call__",anchor:"transformers.FlaxRobertaPreTrainedModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_flax_roberta.py#L609",parametersDescription:[{anchor:"transformers.FlaxRobertaPreTrainedModel.__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/bert#transformers.BertTokenizer">BertTokenizer</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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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/roberta#transformers.RobertaConfig"
>RobertaConfig</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>
`}}),us=new fe({props:{$$slots:{default:[Wz]},$$scope:{ctx:q}}}),xi=new we({props:{code:`from transformers import RobertaTokenizer, FlaxRobertaForMultipleChoice

tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
model = FlaxRobertaForMultipleChoice.from_pretrained("roberta-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> RobertaTokenizer, FlaxRobertaForMultipleChoice

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRobertaForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;roberta-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`}}),qi=new ye({}),Ci=new j({props:{name:"class transformers.FlaxRobertaForTokenClassification",anchor:"transformers.FlaxRobertaForTokenClassification",parameters:[{name:"config",val:": RobertaConfig"},{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/roberta/modeling_flax_roberta.py#L1010",parametersDescription:[{anchor:"transformers.FlaxRobertaForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</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"}]}}),Di=new j({props:{name:"__call__",anchor:"transformers.FlaxRobertaPreTrainedModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_flax_roberta.py#L609",parametersDescription:[{anchor:"transformers.FlaxRobertaPreTrainedModel.__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/bert#transformers.BertTokenizer">BertTokenizer</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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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/roberta#transformers.RobertaConfig"
>RobertaConfig</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>
`}}),ms=new fe({props:{$$slots:{default:[Bz]},$$scope:{ctx:q}}}),Si=new we({props:{code:`from transformers import RobertaTokenizer, FlaxRobertaForTokenClassification

tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
model = FlaxRobertaForTokenClassification.from_pretrained("roberta-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> RobertaTokenizer, FlaxRobertaForTokenClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRobertaForTokenClassification.from_pretrained(<span class="hljs-string">&quot;roberta-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`}}),Wi=new ye({}),Bi=new j({props:{name:"class transformers.FlaxRobertaForQuestionAnswering",anchor:"transformers.FlaxRobertaForQuestionAnswering",parameters:[{name:"config",val:": RobertaConfig"},{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/roberta/modeling_flax_roberta.py#L1082",parametersDescription:[{anchor:"transformers.FlaxRobertaForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/roberta#transformers.RobertaConfig">RobertaConfig</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"}]}}),Xi=new j({props:{name:"__call__",anchor:"transformers.FlaxRobertaPreTrainedModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/roberta/modeling_flax_roberta.py#L609",parametersDescription:[{anchor:"transformers.FlaxRobertaPreTrainedModel.__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/bert#transformers.BertTokenizer">BertTokenizer</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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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.FlaxRobertaPreTrainedModel.__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/roberta#transformers.RobertaConfig"
>RobertaConfig</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>
`}}),_s=new fe({props:{$$slots:{default:[Uz]},$$scope:{ctx:q}}}),Yi=new we({props:{code:`from transformers import RobertaTokenizer, FlaxRobertaForQuestionAnswering

tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
model = FlaxRobertaForQuestionAnswering.from_pretrained("roberta-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> RobertaTokenizer, FlaxRobertaForQuestionAnswering

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