import{S as xb,i as zb,s as qb,e as a,k as l,w as y,t as o,M as Cb,c as r,d as t,m as d,a as i,x as F,h as n,b as h,F as e,g as u,y as M,q as $,o as L,B as E}from"../../chunks/vendor-4833417e.js";import{T as Ee}from"../../chunks/Tip-fffd6df1.js";import{D as ie}from"../../chunks/Docstring-4f315ed9.js";import{C as nt}from"../../chunks/CodeBlock-6a3d1b46.js";import{I as We}from"../../chunks/IconCopyLink-4b81c553.js";import"../../chunks/CopyButton-dacfbfaf.js";function Pb(W){let p,v,m,g,T;return{c(){p=a("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),g=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(b){p=r(b,"P",{});var f=i(p);v=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(f,"CODE",{});var w=i(m);g=n(w,"Module"),w.forEach(t),T=n(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(b,f){u(b,p,f),e(p,v),e(p,m),e(m,g),e(p,T)},d(b){b&&t(p)}}}function jb(W){let p,v,m,g,T;return{c(){p=a("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),g=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(b){p=r(b,"P",{});var f=i(p);v=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(f,"CODE",{});var w=i(m);g=n(w,"Module"),w.forEach(t),T=n(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(b,f){u(b,p,f),e(p,v),e(p,m),e(m,g),e(p,T)},d(b){b&&t(p)}}}function Xb(W){let p,v,m,g,T;return{c(){p=a("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),g=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(b){p=r(b,"P",{});var f=i(p);v=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(f,"CODE",{});var w=i(m);g=n(w,"Module"),w.forEach(t),T=n(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(b,f){u(b,p,f),e(p,v),e(p,m),e(m,g),e(p,T)},d(b){b&&t(p)}}}function Ab(W){let p,v,m,g,T;return{c(){p=a("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),g=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(b){p=r(b,"P",{});var f=i(p);v=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(f,"CODE",{});var w=i(m);g=n(w,"Module"),w.forEach(t),T=n(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(b,f){u(b,p,f),e(p,v),e(p,m),e(m,g),e(p,T)},d(b){b&&t(p)}}}function Sb(W){let p,v,m,g,T;return{c(){p=a("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),g=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(b){p=r(b,"P",{});var f=i(p);v=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(f,"CODE",{});var w=i(m);g=n(w,"Module"),w.forEach(t),T=n(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(b,f){u(b,p,f),e(p,v),e(p,m),e(m,g),e(p,T)},d(b){b&&t(p)}}}function Nb(W){let p,v,m,g,T;return{c(){p=a("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),g=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(b){p=r(b,"P",{});var f=i(p);v=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(f,"CODE",{});var w=i(m);g=n(w,"Module"),w.forEach(t),T=n(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(b,f){u(b,p,f),e(p,v),e(p,m),e(m,g),e(p,T)},d(b){b&&t(p)}}}function Ob(W){let p,v,m,g,T;return{c(){p=a("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),g=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(b){p=r(b,"P",{});var f=i(p);v=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(f,"CODE",{});var w=i(m);g=n(w,"Module"),w.forEach(t),T=n(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(b,f){u(b,p,f),e(p,v),e(p,m),e(m,g),e(p,T)},d(b){b&&t(p)}}}function Db(W){let p,v,m,g,T,b,f,w,le,Y,x,J,H,Z,de,Q,ce,se,U,X,ee,K,z,C,te,R,ae,oe,B,pe,re,q,he,N,ue,me,O,fe,ge,j,G,S,ne;return{c(){p=a("p"),v=o("TF 2.0 models accepts two formats as inputs:"),m=l(),g=a("ul"),T=a("li"),b=o("having all inputs as keyword arguments (like PyTorch models), or"),f=l(),w=a("li"),le=o("having all inputs as a list, tuple or dict in the first positional arguments."),Y=l(),x=a("p"),J=o("This second option is useful when using "),H=a("code"),Z=o("tf.keras.Model.fit"),de=o(` method which currently requires having all the
tensors in the first argument of the model call function: `),Q=a("code"),ce=o("model(inputs)"),se=o("."),U=l(),X=a("p"),ee=o(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),K=l(),z=a("ul"),C=a("li"),te=o("a single Tensor with "),R=a("code"),ae=o("input_ids"),oe=o(" only and nothing else: "),B=a("code"),pe=o("model(inputs_ids)"),re=l(),q=a("li"),he=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),N=a("code"),ue=o("model([input_ids, attention_mask])"),me=o(" or "),O=a("code"),fe=o("model([input_ids, attention_mask, token_type_ids])"),ge=l(),j=a("li"),G=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=a("code"),ne=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(c){p=r(c,"P",{});var k=i(p);v=n(k,"TF 2.0 models accepts two formats as inputs:"),k.forEach(t),m=d(c),g=r(c,"UL",{});var V=i(g);T=r(V,"LI",{});var we=i(T);b=n(we,"having all inputs as keyword arguments (like PyTorch models), or"),we.forEach(t),f=d(V),w=r(V,"LI",{});var ke=i(w);le=n(ke,"having all inputs as a list, tuple or dict in the first positional arguments."),ke.forEach(t),V.forEach(t),Y=d(c),x=r(c,"P",{});var P=i(x);J=n(P,"This second option is useful when using "),H=r(P,"CODE",{});var ve=i(H);Z=n(ve,"tf.keras.Model.fit"),ve.forEach(t),de=n(P,` method which currently requires having all the
tensors in the first argument of the model call function: `),Q=r(P,"CODE",{});var ye=i(Q);ce=n(ye,"model(inputs)"),ye.forEach(t),se=n(P,"."),P.forEach(t),U=d(c),X=r(c,"P",{});var _e=i(X);ee=n(_e,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),_e.forEach(t),K=d(c),z=r(c,"UL",{});var A=i(z);C=r(A,"LI",{});var D=i(C);te=n(D,"a single Tensor with "),R=r(D,"CODE",{});var Fe=i(R);ae=n(Fe,"input_ids"),Fe.forEach(t),oe=n(D," only and nothing else: "),B=r(D,"CODE",{});var Me=i(B);pe=n(Me,"model(inputs_ids)"),Me.forEach(t),D.forEach(t),re=d(A),q=r(A,"LI",{});var I=i(q);he=n(I,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),N=r(I,"CODE",{});var $e=i(N);ue=n($e,"model([input_ids, attention_mask])"),$e.forEach(t),me=n(I," or "),O=r(I,"CODE",{});var Le=i(O);fe=n(Le,"model([input_ids, attention_mask, token_type_ids])"),Le.forEach(t),I.forEach(t),ge=d(A),j=r(A,"LI",{});var be=i(j);G=n(be,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=r(be,"CODE",{});var Te=i(S);ne=n(Te,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Te.forEach(t),be.forEach(t),A.forEach(t)},m(c,k){u(c,p,k),e(p,v),u(c,m,k),u(c,g,k),e(g,T),e(T,b),e(g,f),e(g,w),e(w,le),u(c,Y,k),u(c,x,k),e(x,J),e(x,H),e(H,Z),e(x,de),e(x,Q),e(Q,ce),e(x,se),u(c,U,k),u(c,X,k),e(X,ee),u(c,K,k),u(c,z,k),e(z,C),e(C,te),e(C,R),e(R,ae),e(C,oe),e(C,B),e(B,pe),e(z,re),e(z,q),e(q,he),e(q,N),e(N,ue),e(q,me),e(q,O),e(O,fe),e(z,ge),e(z,j),e(j,G),e(j,S),e(S,ne)},d(c){c&&t(p),c&&t(m),c&&t(g),c&&t(Y),c&&t(x),c&&t(U),c&&t(X),c&&t(K),c&&t(z)}}}function Ib(W){let p,v,m,g,T;return{c(){p=a("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),g=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(b){p=r(b,"P",{});var f=i(p);v=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(f,"CODE",{});var w=i(m);g=n(w,"Module"),w.forEach(t),T=n(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(b,f){u(b,p,f),e(p,v),e(p,m),e(m,g),e(p,T)},d(b){b&&t(p)}}}function Wb(W){let p,v,m,g,T,b,f,w,le,Y,x,J,H,Z,de,Q,ce,se,U,X,ee,K,z,C,te,R,ae,oe,B,pe,re,q,he,N,ue,me,O,fe,ge,j,G,S,ne;return{c(){p=a("p"),v=o("TF 2.0 models accepts two formats as inputs:"),m=l(),g=a("ul"),T=a("li"),b=o("having all inputs as keyword arguments (like PyTorch models), or"),f=l(),w=a("li"),le=o("having all inputs as a list, tuple or dict in the first positional arguments."),Y=l(),x=a("p"),J=o("This second option is useful when using "),H=a("code"),Z=o("tf.keras.Model.fit"),de=o(` method which currently requires having all the
tensors in the first argument of the model call function: `),Q=a("code"),ce=o("model(inputs)"),se=o("."),U=l(),X=a("p"),ee=o(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),K=l(),z=a("ul"),C=a("li"),te=o("a single Tensor with "),R=a("code"),ae=o("input_ids"),oe=o(" only and nothing else: "),B=a("code"),pe=o("model(inputs_ids)"),re=l(),q=a("li"),he=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),N=a("code"),ue=o("model([input_ids, attention_mask])"),me=o(" or "),O=a("code"),fe=o("model([input_ids, attention_mask, token_type_ids])"),ge=l(),j=a("li"),G=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=a("code"),ne=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(c){p=r(c,"P",{});var k=i(p);v=n(k,"TF 2.0 models accepts two formats as inputs:"),k.forEach(t),m=d(c),g=r(c,"UL",{});var V=i(g);T=r(V,"LI",{});var we=i(T);b=n(we,"having all inputs as keyword arguments (like PyTorch models), or"),we.forEach(t),f=d(V),w=r(V,"LI",{});var ke=i(w);le=n(ke,"having all inputs as a list, tuple or dict in the first positional arguments."),ke.forEach(t),V.forEach(t),Y=d(c),x=r(c,"P",{});var P=i(x);J=n(P,"This second option is useful when using "),H=r(P,"CODE",{});var ve=i(H);Z=n(ve,"tf.keras.Model.fit"),ve.forEach(t),de=n(P,` method which currently requires having all the
tensors in the first argument of the model call function: `),Q=r(P,"CODE",{});var ye=i(Q);ce=n(ye,"model(inputs)"),ye.forEach(t),se=n(P,"."),P.forEach(t),U=d(c),X=r(c,"P",{});var _e=i(X);ee=n(_e,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),_e.forEach(t),K=d(c),z=r(c,"UL",{});var A=i(z);C=r(A,"LI",{});var D=i(C);te=n(D,"a single Tensor with "),R=r(D,"CODE",{});var Fe=i(R);ae=n(Fe,"input_ids"),Fe.forEach(t),oe=n(D," only and nothing else: "),B=r(D,"CODE",{});var Me=i(B);pe=n(Me,"model(inputs_ids)"),Me.forEach(t),D.forEach(t),re=d(A),q=r(A,"LI",{});var I=i(q);he=n(I,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),N=r(I,"CODE",{});var $e=i(N);ue=n($e,"model([input_ids, attention_mask])"),$e.forEach(t),me=n(I," or "),O=r(I,"CODE",{});var Le=i(O);fe=n(Le,"model([input_ids, attention_mask, token_type_ids])"),Le.forEach(t),I.forEach(t),ge=d(A),j=r(A,"LI",{});var be=i(j);G=n(be,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=r(be,"CODE",{});var Te=i(S);ne=n(Te,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Te.forEach(t),be.forEach(t),A.forEach(t)},m(c,k){u(c,p,k),e(p,v),u(c,m,k),u(c,g,k),e(g,T),e(T,b),e(g,f),e(g,w),e(w,le),u(c,Y,k),u(c,x,k),e(x,J),e(x,H),e(H,Z),e(x,de),e(x,Q),e(Q,ce),e(x,se),u(c,U,k),u(c,X,k),e(X,ee),u(c,K,k),u(c,z,k),e(z,C),e(C,te),e(C,R),e(R,ae),e(C,oe),e(C,B),e(B,pe),e(z,re),e(z,q),e(q,he),e(q,N),e(N,ue),e(q,me),e(q,O),e(O,fe),e(z,ge),e(z,j),e(j,G),e(j,S),e(S,ne)},d(c){c&&t(p),c&&t(m),c&&t(g),c&&t(Y),c&&t(x),c&&t(U),c&&t(X),c&&t(K),c&&t(z)}}}function Hb(W){let p,v,m,g,T;return{c(){p=a("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),g=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(b){p=r(b,"P",{});var f=i(p);v=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(f,"CODE",{});var w=i(m);g=n(w,"Module"),w.forEach(t),T=n(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(b,f){u(b,p,f),e(p,v),e(p,m),e(m,g),e(p,T)},d(b){b&&t(p)}}}function Qb(W){let p,v,m,g,T,b,f,w,le,Y,x,J,H,Z,de,Q,ce,se,U,X,ee,K,z,C,te,R,ae,oe,B,pe,re,q,he,N,ue,me,O,fe,ge,j,G,S,ne;return{c(){p=a("p"),v=o("TF 2.0 models accepts two formats as inputs:"),m=l(),g=a("ul"),T=a("li"),b=o("having all inputs as keyword arguments (like PyTorch models), or"),f=l(),w=a("li"),le=o("having all inputs as a list, tuple or dict in the first positional arguments."),Y=l(),x=a("p"),J=o("This second option is useful when using "),H=a("code"),Z=o("tf.keras.Model.fit"),de=o(` method which currently requires having all the
tensors in the first argument of the model call function: `),Q=a("code"),ce=o("model(inputs)"),se=o("."),U=l(),X=a("p"),ee=o(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),K=l(),z=a("ul"),C=a("li"),te=o("a single Tensor with "),R=a("code"),ae=o("input_ids"),oe=o(" only and nothing else: "),B=a("code"),pe=o("model(inputs_ids)"),re=l(),q=a("li"),he=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),N=a("code"),ue=o("model([input_ids, attention_mask])"),me=o(" or "),O=a("code"),fe=o("model([input_ids, attention_mask, token_type_ids])"),ge=l(),j=a("li"),G=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=a("code"),ne=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(c){p=r(c,"P",{});var k=i(p);v=n(k,"TF 2.0 models accepts two formats as inputs:"),k.forEach(t),m=d(c),g=r(c,"UL",{});var V=i(g);T=r(V,"LI",{});var we=i(T);b=n(we,"having all inputs as keyword arguments (like PyTorch models), or"),we.forEach(t),f=d(V),w=r(V,"LI",{});var ke=i(w);le=n(ke,"having all inputs as a list, tuple or dict in the first positional arguments."),ke.forEach(t),V.forEach(t),Y=d(c),x=r(c,"P",{});var P=i(x);J=n(P,"This second option is useful when using "),H=r(P,"CODE",{});var ve=i(H);Z=n(ve,"tf.keras.Model.fit"),ve.forEach(t),de=n(P,` method which currently requires having all the
tensors in the first argument of the model call function: `),Q=r(P,"CODE",{});var ye=i(Q);ce=n(ye,"model(inputs)"),ye.forEach(t),se=n(P,"."),P.forEach(t),U=d(c),X=r(c,"P",{});var _e=i(X);ee=n(_e,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),_e.forEach(t),K=d(c),z=r(c,"UL",{});var A=i(z);C=r(A,"LI",{});var D=i(C);te=n(D,"a single Tensor with "),R=r(D,"CODE",{});var Fe=i(R);ae=n(Fe,"input_ids"),Fe.forEach(t),oe=n(D," only and nothing else: "),B=r(D,"CODE",{});var Me=i(B);pe=n(Me,"model(inputs_ids)"),Me.forEach(t),D.forEach(t),re=d(A),q=r(A,"LI",{});var I=i(q);he=n(I,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),N=r(I,"CODE",{});var $e=i(N);ue=n($e,"model([input_ids, attention_mask])"),$e.forEach(t),me=n(I," or "),O=r(I,"CODE",{});var Le=i(O);fe=n(Le,"model([input_ids, attention_mask, token_type_ids])"),Le.forEach(t),I.forEach(t),ge=d(A),j=r(A,"LI",{});var be=i(j);G=n(be,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=r(be,"CODE",{});var Te=i(S);ne=n(Te,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Te.forEach(t),be.forEach(t),A.forEach(t)},m(c,k){u(c,p,k),e(p,v),u(c,m,k),u(c,g,k),e(g,T),e(T,b),e(g,f),e(g,w),e(w,le),u(c,Y,k),u(c,x,k),e(x,J),e(x,H),e(H,Z),e(x,de),e(x,Q),e(Q,ce),e(x,se),u(c,U,k),u(c,X,k),e(X,ee),u(c,K,k),u(c,z,k),e(z,C),e(C,te),e(C,R),e(R,ae),e(C,oe),e(C,B),e(B,pe),e(z,re),e(z,q),e(q,he),e(q,N),e(N,ue),e(q,me),e(q,O),e(O,fe),e(z,ge),e(z,j),e(j,G),e(j,S),e(S,ne)},d(c){c&&t(p),c&&t(m),c&&t(g),c&&t(Y),c&&t(x),c&&t(U),c&&t(X),c&&t(K),c&&t(z)}}}function Bb(W){let p,v,m,g,T;return{c(){p=a("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),g=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(b){p=r(b,"P",{});var f=i(p);v=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(f,"CODE",{});var w=i(m);g=n(w,"Module"),w.forEach(t),T=n(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(b,f){u(b,p,f),e(p,v),e(p,m),e(m,g),e(p,T)},d(b){b&&t(p)}}}function Rb(W){let p,v,m,g,T,b,f,w,le,Y,x,J,H,Z,de,Q,ce,se,U,X,ee,K,z,C,te,R,ae,oe,B,pe,re,q,he,N,ue,me,O,fe,ge,j,G,S,ne;return{c(){p=a("p"),v=o("TF 2.0 models accepts two formats as inputs:"),m=l(),g=a("ul"),T=a("li"),b=o("having all inputs as keyword arguments (like PyTorch models), or"),f=l(),w=a("li"),le=o("having all inputs as a list, tuple or dict in the first positional arguments."),Y=l(),x=a("p"),J=o("This second option is useful when using "),H=a("code"),Z=o("tf.keras.Model.fit"),de=o(` method which currently requires having all the
tensors in the first argument of the model call function: `),Q=a("code"),ce=o("model(inputs)"),se=o("."),U=l(),X=a("p"),ee=o(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),K=l(),z=a("ul"),C=a("li"),te=o("a single Tensor with "),R=a("code"),ae=o("input_ids"),oe=o(" only and nothing else: "),B=a("code"),pe=o("model(inputs_ids)"),re=l(),q=a("li"),he=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),N=a("code"),ue=o("model([input_ids, attention_mask])"),me=o(" or "),O=a("code"),fe=o("model([input_ids, attention_mask, token_type_ids])"),ge=l(),j=a("li"),G=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=a("code"),ne=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(c){p=r(c,"P",{});var k=i(p);v=n(k,"TF 2.0 models accepts two formats as inputs:"),k.forEach(t),m=d(c),g=r(c,"UL",{});var V=i(g);T=r(V,"LI",{});var we=i(T);b=n(we,"having all inputs as keyword arguments (like PyTorch models), or"),we.forEach(t),f=d(V),w=r(V,"LI",{});var ke=i(w);le=n(ke,"having all inputs as a list, tuple or dict in the first positional arguments."),ke.forEach(t),V.forEach(t),Y=d(c),x=r(c,"P",{});var P=i(x);J=n(P,"This second option is useful when using "),H=r(P,"CODE",{});var ve=i(H);Z=n(ve,"tf.keras.Model.fit"),ve.forEach(t),de=n(P,` method which currently requires having all the
tensors in the first argument of the model call function: `),Q=r(P,"CODE",{});var ye=i(Q);ce=n(ye,"model(inputs)"),ye.forEach(t),se=n(P,"."),P.forEach(t),U=d(c),X=r(c,"P",{});var _e=i(X);ee=n(_e,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),_e.forEach(t),K=d(c),z=r(c,"UL",{});var A=i(z);C=r(A,"LI",{});var D=i(C);te=n(D,"a single Tensor with "),R=r(D,"CODE",{});var Fe=i(R);ae=n(Fe,"input_ids"),Fe.forEach(t),oe=n(D," only and nothing else: "),B=r(D,"CODE",{});var Me=i(B);pe=n(Me,"model(inputs_ids)"),Me.forEach(t),D.forEach(t),re=d(A),q=r(A,"LI",{});var I=i(q);he=n(I,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),N=r(I,"CODE",{});var $e=i(N);ue=n($e,"model([input_ids, attention_mask])"),$e.forEach(t),me=n(I," or "),O=r(I,"CODE",{});var Le=i(O);fe=n(Le,"model([input_ids, attention_mask, token_type_ids])"),Le.forEach(t),I.forEach(t),ge=d(A),j=r(A,"LI",{});var be=i(j);G=n(be,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=r(be,"CODE",{});var Te=i(S);ne=n(Te,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Te.forEach(t),be.forEach(t),A.forEach(t)},m(c,k){u(c,p,k),e(p,v),u(c,m,k),u(c,g,k),e(g,T),e(T,b),e(g,f),e(g,w),e(w,le),u(c,Y,k),u(c,x,k),e(x,J),e(x,H),e(H,Z),e(x,de),e(x,Q),e(Q,ce),e(x,se),u(c,U,k),u(c,X,k),e(X,ee),u(c,K,k),u(c,z,k),e(z,C),e(C,te),e(C,R),e(R,ae),e(C,oe),e(C,B),e(B,pe),e(z,re),e(z,q),e(q,he),e(q,N),e(N,ue),e(q,me),e(q,O),e(O,fe),e(z,ge),e(z,j),e(j,G),e(j,S),e(S,ne)},d(c){c&&t(p),c&&t(m),c&&t(g),c&&t(Y),c&&t(x),c&&t(U),c&&t(X),c&&t(K),c&&t(z)}}}function Ub(W){let p,v,m,g,T;return{c(){p=a("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),g=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(b){p=r(b,"P",{});var f=i(p);v=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(f,"CODE",{});var w=i(m);g=n(w,"Module"),w.forEach(t),T=n(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(b,f){u(b,p,f),e(p,v),e(p,m),e(m,g),e(p,T)},d(b){b&&t(p)}}}function Vb(W){let p,v,m,g,T,b,f,w,le,Y,x,J,H,Z,de,Q,ce,se,U,X,ee,K,z,C,te,R,ae,oe,B,pe,re,q,he,N,ue,me,O,fe,ge,j,G,S,ne;return{c(){p=a("p"),v=o("TF 2.0 models accepts two formats as inputs:"),m=l(),g=a("ul"),T=a("li"),b=o("having all inputs as keyword arguments (like PyTorch models), or"),f=l(),w=a("li"),le=o("having all inputs as a list, tuple or dict in the first positional arguments."),Y=l(),x=a("p"),J=o("This second option is useful when using "),H=a("code"),Z=o("tf.keras.Model.fit"),de=o(` method which currently requires having all the
tensors in the first argument of the model call function: `),Q=a("code"),ce=o("model(inputs)"),se=o("."),U=l(),X=a("p"),ee=o(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),K=l(),z=a("ul"),C=a("li"),te=o("a single Tensor with "),R=a("code"),ae=o("input_ids"),oe=o(" only and nothing else: "),B=a("code"),pe=o("model(inputs_ids)"),re=l(),q=a("li"),he=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),N=a("code"),ue=o("model([input_ids, attention_mask])"),me=o(" or "),O=a("code"),fe=o("model([input_ids, attention_mask, token_type_ids])"),ge=l(),j=a("li"),G=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=a("code"),ne=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(c){p=r(c,"P",{});var k=i(p);v=n(k,"TF 2.0 models accepts two formats as inputs:"),k.forEach(t),m=d(c),g=r(c,"UL",{});var V=i(g);T=r(V,"LI",{});var we=i(T);b=n(we,"having all inputs as keyword arguments (like PyTorch models), or"),we.forEach(t),f=d(V),w=r(V,"LI",{});var ke=i(w);le=n(ke,"having all inputs as a list, tuple or dict in the first positional arguments."),ke.forEach(t),V.forEach(t),Y=d(c),x=r(c,"P",{});var P=i(x);J=n(P,"This second option is useful when using "),H=r(P,"CODE",{});var ve=i(H);Z=n(ve,"tf.keras.Model.fit"),ve.forEach(t),de=n(P,` method which currently requires having all the
tensors in the first argument of the model call function: `),Q=r(P,"CODE",{});var ye=i(Q);ce=n(ye,"model(inputs)"),ye.forEach(t),se=n(P,"."),P.forEach(t),U=d(c),X=r(c,"P",{});var _e=i(X);ee=n(_e,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),_e.forEach(t),K=d(c),z=r(c,"UL",{});var A=i(z);C=r(A,"LI",{});var D=i(C);te=n(D,"a single Tensor with "),R=r(D,"CODE",{});var Fe=i(R);ae=n(Fe,"input_ids"),Fe.forEach(t),oe=n(D," only and nothing else: "),B=r(D,"CODE",{});var Me=i(B);pe=n(Me,"model(inputs_ids)"),Me.forEach(t),D.forEach(t),re=d(A),q=r(A,"LI",{});var I=i(q);he=n(I,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),N=r(I,"CODE",{});var $e=i(N);ue=n($e,"model([input_ids, attention_mask])"),$e.forEach(t),me=n(I," or "),O=r(I,"CODE",{});var Le=i(O);fe=n(Le,"model([input_ids, attention_mask, token_type_ids])"),Le.forEach(t),I.forEach(t),ge=d(A),j=r(A,"LI",{});var be=i(j);G=n(be,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=r(be,"CODE",{});var Te=i(S);ne=n(Te,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Te.forEach(t),be.forEach(t),A.forEach(t)},m(c,k){u(c,p,k),e(p,v),u(c,m,k),u(c,g,k),e(g,T),e(T,b),e(g,f),e(g,w),e(w,le),u(c,Y,k),u(c,x,k),e(x,J),e(x,H),e(H,Z),e(x,de),e(x,Q),e(Q,ce),e(x,se),u(c,U,k),u(c,X,k),e(X,ee),u(c,K,k),u(c,z,k),e(z,C),e(C,te),e(C,R),e(R,ae),e(C,oe),e(C,B),e(B,pe),e(z,re),e(z,q),e(q,he),e(q,N),e(N,ue),e(q,me),e(q,O),e(O,fe),e(z,ge),e(z,j),e(j,G),e(j,S),e(S,ne)},d(c){c&&t(p),c&&t(m),c&&t(g),c&&t(Y),c&&t(x),c&&t(U),c&&t(X),c&&t(K),c&&t(z)}}}function Yb(W){let p,v,m,g,T;return{c(){p=a("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),g=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(b){p=r(b,"P",{});var f=i(p);v=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(f,"CODE",{});var w=i(m);g=n(w,"Module"),w.forEach(t),T=n(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(b,f){u(b,p,f),e(p,v),e(p,m),e(m,g),e(p,T)},d(b){b&&t(p)}}}function Kb(W){let p,v,m,g,T,b,f,w,le,Y,x,J,H,Z,de,Q,ce,se,U,X,ee,K,z,C,te,R,ae,oe,B,pe,re,q,he,N,ue,me,O,fe,ge,j,G,S,ne;return{c(){p=a("p"),v=o("TF 2.0 models accepts two formats as inputs:"),m=l(),g=a("ul"),T=a("li"),b=o("having all inputs as keyword arguments (like PyTorch models), or"),f=l(),w=a("li"),le=o("having all inputs as a list, tuple or dict in the first positional arguments."),Y=l(),x=a("p"),J=o("This second option is useful when using "),H=a("code"),Z=o("tf.keras.Model.fit"),de=o(` method which currently requires having all the
tensors in the first argument of the model call function: `),Q=a("code"),ce=o("model(inputs)"),se=o("."),U=l(),X=a("p"),ee=o(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),K=l(),z=a("ul"),C=a("li"),te=o("a single Tensor with "),R=a("code"),ae=o("input_ids"),oe=o(" only and nothing else: "),B=a("code"),pe=o("model(inputs_ids)"),re=l(),q=a("li"),he=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),N=a("code"),ue=o("model([input_ids, attention_mask])"),me=o(" or "),O=a("code"),fe=o("model([input_ids, attention_mask, token_type_ids])"),ge=l(),j=a("li"),G=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=a("code"),ne=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(c){p=r(c,"P",{});var k=i(p);v=n(k,"TF 2.0 models accepts two formats as inputs:"),k.forEach(t),m=d(c),g=r(c,"UL",{});var V=i(g);T=r(V,"LI",{});var we=i(T);b=n(we,"having all inputs as keyword arguments (like PyTorch models), or"),we.forEach(t),f=d(V),w=r(V,"LI",{});var ke=i(w);le=n(ke,"having all inputs as a list, tuple or dict in the first positional arguments."),ke.forEach(t),V.forEach(t),Y=d(c),x=r(c,"P",{});var P=i(x);J=n(P,"This second option is useful when using "),H=r(P,"CODE",{});var ve=i(H);Z=n(ve,"tf.keras.Model.fit"),ve.forEach(t),de=n(P,` method which currently requires having all the
tensors in the first argument of the model call function: `),Q=r(P,"CODE",{});var ye=i(Q);ce=n(ye,"model(inputs)"),ye.forEach(t),se=n(P,"."),P.forEach(t),U=d(c),X=r(c,"P",{});var _e=i(X);ee=n(_e,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),_e.forEach(t),K=d(c),z=r(c,"UL",{});var A=i(z);C=r(A,"LI",{});var D=i(C);te=n(D,"a single Tensor with "),R=r(D,"CODE",{});var Fe=i(R);ae=n(Fe,"input_ids"),Fe.forEach(t),oe=n(D," only and nothing else: "),B=r(D,"CODE",{});var Me=i(B);pe=n(Me,"model(inputs_ids)"),Me.forEach(t),D.forEach(t),re=d(A),q=r(A,"LI",{});var I=i(q);he=n(I,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),N=r(I,"CODE",{});var $e=i(N);ue=n($e,"model([input_ids, attention_mask])"),$e.forEach(t),me=n(I," or "),O=r(I,"CODE",{});var Le=i(O);fe=n(Le,"model([input_ids, attention_mask, token_type_ids])"),Le.forEach(t),I.forEach(t),ge=d(A),j=r(A,"LI",{});var be=i(j);G=n(be,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=r(be,"CODE",{});var Te=i(S);ne=n(Te,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Te.forEach(t),be.forEach(t),A.forEach(t)},m(c,k){u(c,p,k),e(p,v),u(c,m,k),u(c,g,k),e(g,T),e(T,b),e(g,f),e(g,w),e(w,le),u(c,Y,k),u(c,x,k),e(x,J),e(x,H),e(H,Z),e(x,de),e(x,Q),e(Q,ce),e(x,se),u(c,U,k),u(c,X,k),e(X,ee),u(c,K,k),u(c,z,k),e(z,C),e(C,te),e(C,R),e(R,ae),e(C,oe),e(C,B),e(B,pe),e(z,re),e(z,q),e(q,he),e(q,N),e(N,ue),e(q,me),e(q,O),e(O,fe),e(z,ge),e(z,j),e(j,G),e(j,S),e(S,ne)},d(c){c&&t(p),c&&t(m),c&&t(g),c&&t(Y),c&&t(x),c&&t(U),c&&t(X),c&&t(K),c&&t(z)}}}function Gb(W){let p,v,m,g,T;return{c(){p=a("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a("code"),g=o("Module"),T=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(b){p=r(b,"P",{});var f=i(p);v=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(f,"CODE",{});var w=i(m);g=n(w,"Module"),w.forEach(t),T=n(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(b,f){u(b,p,f),e(p,v),e(p,m),e(m,g),e(p,T)},d(b){b&&t(p)}}}function Jb(W){let p,v,m,g,T,b,f,w,le,Y,x,J,H,Z,de,Q,ce,se,U,X,ee,K,z,C,te,R,ae,oe,B,pe,re,q,he,N,ue,me,O,fe,ge,j,G,S,ne,c,k,V,we,ke,P,ve,ye,_e,A,D,Fe,Me,I,$e,Le,be,Te,Jl,Bs,Zl,ed,Rs,td,od,xi,Ct,co,Ba,Ro,nd,Ra,sd,zi,st,Uo,ad,Ua,rd,id,_t,Va,ld,dd,Ya,cd,pd,bt,hd,Ka,ud,md,Ga,fd,gd,Ja,_d,bd,Td,Vo,vd,Za,kd,wd,yd,Yo,Fd,Us,Md,$d,qi,Pt,po,er,Ko,Ld,tr,Ed,Ci,He,Go,xd,or,zd,qd,Jo,Cd,Vs,Pd,jd,Xd,Zo,Ad,en,Sd,Nd,Od,Qe,tn,Dd,jt,Id,Ys,Wd,Hd,nr,Qd,Bd,Rd,ho,Ud,sr,Vd,Yd,on,Pi,Xt,uo,ar,nn,Kd,rr,Gd,ji,ze,sn,Jd,ir,Zd,ec,an,tc,Ks,oc,nc,sc,rn,ac,ln,rc,ic,lc,dn,dc,Gs,cc,pc,hc,Be,cn,uc,At,mc,Js,fc,gc,lr,_c,bc,Tc,mo,vc,dr,kc,wc,pn,Xi,St,fo,cr,hn,yc,pr,Fc,Ai,qe,un,Mc,hr,$c,Lc,mn,Ec,Zs,xc,zc,qc,fn,Cc,gn,Pc,jc,Xc,_n,Ac,ea,Sc,Nc,Oc,xe,bn,Dc,Nt,Ic,ta,Wc,Hc,ur,Qc,Bc,Rc,go,Uc,mr,Vc,Yc,Tn,Kc,fr,Gc,Jc,vn,Si,Ot,_o,gr,kn,Zc,_r,ep,Ni,Ce,wn,tp,br,op,np,yn,sp,oa,ap,rp,ip,Fn,lp,Mn,dp,cp,pp,$n,hp,na,up,mp,fp,Re,Ln,gp,Dt,_p,sa,bp,Tp,Tr,vp,kp,wp,bo,yp,vr,Fp,Mp,En,Oi,It,To,kr,xn,$p,wr,Lp,Di,Pe,zn,Ep,yr,xp,zp,qn,qp,aa,Cp,Pp,jp,Cn,Xp,Pn,Ap,Sp,Np,jn,Op,ra,Dp,Ip,Wp,Ue,Xn,Hp,Wt,Qp,ia,Bp,Rp,Fr,Up,Vp,Yp,vo,Kp,Mr,Gp,Jp,An,Ii,Ht,ko,$r,Sn,Zp,Lr,eh,Wi,je,Nn,th,Qt,oh,Er,nh,sh,xr,ah,rh,ih,On,lh,la,dh,ch,ph,Dn,hh,In,uh,mh,fh,Wn,gh,da,_h,bh,Th,Ve,Hn,vh,Bt,kh,ca,wh,yh,zr,Fh,Mh,$h,wo,Lh,qr,Eh,xh,Qn,Hi,Rt,yo,Cr,Bn,zh,Pr,qh,Qi,Xe,Rn,Ch,Ut,Ph,jr,jh,Xh,Xr,Ah,Sh,Nh,Un,Oh,pa,Dh,Ih,Wh,Vn,Hh,Yn,Qh,Bh,Rh,Kn,Uh,ha,Vh,Yh,Kh,Ye,Gn,Gh,Vt,Jh,ua,Zh,eu,Ar,tu,ou,nu,Fo,su,Sr,au,ru,Jn,Bi,Yt,Mo,Nr,Zn,iu,Or,lu,Ri,Ae,es,du,Dr,cu,pu,ts,hu,ma,uu,mu,fu,os,gu,ns,_u,bu,Tu,$o,vu,Ke,ss,ku,Kt,wu,fa,yu,Fu,Ir,Mu,$u,Lu,Lo,Eu,Wr,xu,zu,as,Ui,Gt,Eo,Hr,rs,qu,Qr,Cu,Vi,Se,is,Pu,Br,ju,Xu,ls,Au,ga,Su,Nu,Ou,ds,Du,cs,Iu,Wu,Hu,xo,Qu,Ge,ps,Bu,Jt,Ru,_a,Uu,Vu,Rr,Yu,Ku,Gu,zo,Ju,Ur,Zu,em,hs,Yi,Zt,qo,Vr,us,tm,Yr,om,Ki,Ne,ms,nm,Kr,sm,am,fs,rm,ba,im,lm,dm,gs,cm,_s,pm,hm,um,Co,mm,Je,bs,fm,eo,gm,Ta,_m,bm,Gr,Tm,vm,km,Po,wm,Jr,ym,Fm,Ts,Gi,to,jo,Zr,vs,Mm,ei,$m,Ji,Oe,ks,Lm,ti,Em,xm,ws,zm,va,qm,Cm,Pm,ys,jm,Fs,Xm,Am,Sm,Xo,Nm,Ze,Ms,Om,oo,Dm,ka,Im,Wm,oi,Hm,Qm,Bm,Ao,Rm,ni,Um,Vm,$s,Zi,no,So,si,Ls,Ym,ai,Km,el,De,Es,Gm,ri,Jm,Zm,xs,ef,wa,tf,of,nf,zs,sf,qs,af,rf,lf,No,df,et,Cs,cf,so,pf,ya,hf,uf,ii,mf,ff,gf,Oo,_f,li,bf,Tf,Ps,tl,ao,Do,di,js,vf,ci,kf,ol,Ie,Xs,wf,ro,yf,pi,Ff,Mf,hi,$f,Lf,Ef,As,xf,Fa,zf,qf,Cf,Ss,Pf,Ns,jf,Xf,Af,Io,Sf,tt,Os,Nf,io,Of,Ma,Df,If,ui,Wf,Hf,Qf,Wo,Bf,mi,Rf,Uf,Ds,nl;return b=new We({}),Z=new We({}),c=new We({}),ve=new ie({props:{name:"class transformers.FlaubertConfig",anchor:"transformers.FlaubertConfig",parameters:[{name:"layerdrop",val:" = 0.0"},{name:"pre_norm",val:" = False"},{name:"pad_token_id",val:" = 2"},{name:"bos_token_id",val:" = 0"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/flaubert/configuration_flaubert.py#L31",parametersDescription:[{anchor:"transformers.FlaubertConfig.pre_norm",description:`<strong>pre_norm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to apply the layer normalization before or after the feed forward layer following the attention in
each layer (Vaswani et al., Tensor2Tensor for Neural Machine Translation. 2018)`,name:"pre_norm"},{anchor:"transformers.FlaubertConfig.layerdrop",description:`<strong>layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Probability to drop layers during training (Fan et al., Reducing Transformer Depth on Demand with
Structured Dropout. ICLR 2020)`,name:"layerdrop"},{anchor:"transformers.FlaubertConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30145) &#x2014;
Vocabulary size of the FlauBERT model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/pr_15839/en/model_doc/flaubert#transformers.FlaubertModel">FlaubertModel</a> or <a href="/docs/transformers/pr_15839/en/model_doc/flaubert#transformers.TFFlaubertModel">TFFlaubertModel</a>.`,name:"vocab_size"},{anchor:"transformers.FlaubertConfig.emb_dim",description:`<strong>emb_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"emb_dim"},{anchor:"transformers.FlaubertConfig.n_layer",description:`<strong>n_layer</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"n_layer"},{anchor:"transformers.FlaubertConfig.n_head",description:`<strong>n_head</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"n_head"},{anchor:"transformers.FlaubertConfig.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.FlaubertConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for the attention mechanism`,name:"attention_dropout"},{anchor:"transformers.FlaubertConfig.gelu_activation",description:`<strong>gelu_activation</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use a <em>gelu</em> activation instead of <em>relu</em>.`,name:"gelu_activation"},{anchor:"transformers.FlaubertConfig.sinusoidal_embeddings",description:`<strong>sinusoidal_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use sinusoidal positional embeddings instead of absolute positional embeddings.`,name:"sinusoidal_embeddings"},{anchor:"transformers.FlaubertConfig.causal",description:`<strong>causal</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the model should behave in a causal manner. Causal models use a triangular attention mask in
order to only attend to the left-side context instead if a bidirectional context.`,name:"causal"},{anchor:"transformers.FlaubertConfig.asm",description:`<strong>asm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use an adaptive log softmax projection layer instead of a linear layer for the prediction
layer.`,name:"asm"},{anchor:"transformers.FlaubertConfig.n_langs",description:`<strong>n_langs</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of languages the model handles. Set to 1 for monolingual models.`,name:"n_langs"},{anchor:"transformers.FlaubertConfig.use_lang_emb",description:`<strong>use_lang_emb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use language embeddings. Some models use additional language embeddings, see <a href="http://huggingface.co/transformers/multilingual.html#xlm-language-embeddings" rel="nofollow">the multilingual
models page</a> for information
on how to use them.`,name:"use_lang_emb"},{anchor:"transformers.FlaubertConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.FlaubertConfig.embed_init_std",description:`<strong>embed_init_std</strong> (<code>float</code>, <em>optional</em>, defaults to 2048^-0.5) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing the embedding matrices.`,name:"embed_init_std"},{anchor:"transformers.FlaubertConfig.init_std",description:`<strong>init_std</strong> (<code>int</code>, <em>optional</em>, defaults to 50257) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices except the
embedding matrices.`,name:"init_std"},{anchor:"transformers.FlaubertConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.FlaubertConfig.bos_index",description:`<strong>bos_index</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The index of the beginning of sentence token in the vocabulary.`,name:"bos_index"},{anchor:"transformers.FlaubertConfig.eos_index",description:`<strong>eos_index</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The index of the end of sentence token in the vocabulary.`,name:"eos_index"},{anchor:"transformers.FlaubertConfig.pad_index",description:`<strong>pad_index</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The index of the padding token in the vocabulary.`,name:"pad_index"},{anchor:"transformers.FlaubertConfig.unk_index",description:`<strong>unk_index</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The index of the unknown token in the vocabulary.`,name:"unk_index"},{anchor:"transformers.FlaubertConfig.mask_index",description:`<strong>mask_index</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
The index of the masking token in the vocabulary.`,name:"mask_index"},{anchor:"transformers.FlaubertConfig.is_encoder(bool,",description:`<strong>is_encoder(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the initialized model should be a transformer encoder or decoder as seen in Vaswani et al.`,name:"is_encoder(bool,"},{anchor:"transformers.FlaubertConfig.summary_type",description:`<strong>summary_type</strong> (<code>string</code>, <em>optional</em>, defaults to &#x201C;first&#x201D;) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>Has to be one of the following options:</p>
<ul>
<li><code>&quot;last&quot;</code>: Take the last token hidden state (like XLNet).</li>
<li><code>&quot;first&quot;</code>: Take the first token hidden state (like BERT).</li>
<li><code>&quot;mean&quot;</code>: Take the mean of all tokens hidden states.</li>
<li><code>&quot;cls_index&quot;</code>: Supply a Tensor of classification token position (like GPT/GPT-2).</li>
<li><code>&quot;attn&quot;</code>: Not implemented now, use multi-head attention.</li>
</ul>`,name:"summary_type"},{anchor:"transformers.FlaubertConfig.summary_use_proj",description:`<strong>summary_use_proj</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>Whether or not to add a projection after the vector extraction.`,name:"summary_use_proj"},{anchor:"transformers.FlaubertConfig.summary_activation",description:`<strong>summary_activation</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>Pass <code>&quot;tanh&quot;</code> for a tanh activation to the output, any other value will result in no activation.`,name:"summary_activation"},{anchor:"transformers.FlaubertConfig.summary_proj_to_labels",description:`<strong>summary_proj_to_labels</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Used in the sequence classification and multiple choice models.</p>
<p>Whether the projection outputs should have <code>config.num_labels</code> or <code>config.hidden_size</code> classes.`,name:"summary_proj_to_labels"},{anchor:"transformers.FlaubertConfig.summary_first_dropout",description:`<strong>summary_first_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
Used in the sequence classification and multiple choice models.</p>
<p>The dropout ratio to be used after the projection and activation.`,name:"summary_first_dropout"},{anchor:"transformers.FlaubertConfig.start_n_top",description:`<strong>start_n_top</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
Used in the SQuAD evaluation script.`,name:"start_n_top"},{anchor:"transformers.FlaubertConfig.end_n_top",description:`<strong>end_n_top</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
Used in the SQuAD evaluation script.`,name:"end_n_top"},{anchor:"transformers.FlaubertConfig.mask_token_id",description:`<strong>mask_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Model agnostic parameter to identify masked tokens when generating text in an MLM context.`,name:"mask_token_id"},{anchor:"transformers.FlaubertConfig.lang_id",description:`<strong>lang_id</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The ID of the language used by the model. This parameter is used when generating text in a given language.`,name:"lang_id"}]}}),Ro=new We({}),Uo=new ie({props:{name:"class transformers.FlaubertTokenizer",anchor:"transformers.FlaubertTokenizer",parameters:[{name:"do_lowercase",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/flaubert/tokenization_flaubert.py#L79"}}),Ko=new We({}),Go=new ie({props:{name:"class transformers.FlaubertModel",anchor:"transformers.FlaubertModel",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/flaubert/modeling_flaubert.py#L134",parametersDescription:[{anchor:"transformers.FlaubertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),tn=new ie({props:{name:"forward",anchor:"transformers.FlaubertModel.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"langs",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"lengths",val:" = None"},{name:"cache",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/flaubert/modeling_flaubert.py#L147",parametersDescription:[{anchor:"transformers.FlaubertModel.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/flaubert#transformers.FlaubertTokenizer">FlaubertTokenizer</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.FlaubertModel.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.FlaubertModel.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.FlaubertModel.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.FlaubertModel.forward.lengths",description:`<strong>lengths</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <code>attention_mask</code> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>:`,name:"lengths"},{anchor:"transformers.FlaubertModel.forward.cache",description:`<strong>cache</strong> (<code>Dict[str, torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Dictionary strings to <code>torch.FloatTensor</code> that contains precomputed hidden-states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding. The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.FlaubertModel.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.FlaubertModel.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.FlaubertModel.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.FlaubertModel.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.FlaubertModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</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/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ho=new Ee({props:{$$slots:{default:[Pb]},$$scope:{ctx:W}}}),on=new nt({props:{code:`from transformers import FlaubertTokenizer, FlaubertModel
import torch

tokenizer = FlaubertTokenizer.from_pretrained("flaubert/flaubert_base_cased")
model = FlaubertModel.from_pretrained("flaubert/flaubert_base_cased")

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = FlaubertTokenizer.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaubertModel.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&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`}}),nn=new We({}),sn=new ie({props:{name:"class transformers.FlaubertWithLMHeadModel",anchor:"transformers.FlaubertWithLMHeadModel",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/flaubert/modeling_flaubert.py#L326",parametersDescription:[{anchor:"transformers.FlaubertWithLMHeadModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</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"}]}}),cn=new ie({props:{name:"forward",anchor:"transformers.XLMWithLMHeadModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"langs",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:"lengths",val:": typing.Optional[torch.Tensor] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, torch.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/xlm/modeling_xlm.py#L709",parametersDescription:[{anchor:"transformers.XLMWithLMHeadModel.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/xlm#transformers.XLMTokenizer">XLMTokenizer</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.XLMWithLMHeadModel.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.XLMWithLMHeadModel.forward.langs",description:`<strong>langs</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.XLMWithLMHeadModel.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.XLMWithLMHeadModel.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.XLMWithLMHeadModel.forward.lengths",description:`<strong>lengths</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.XLMWithLMHeadModel.forward.cache",description:`<strong>cache</strong> (<code>Dict[str, torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.XLMWithLMHeadModel.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.XLMWithLMHeadModel.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.XLMWithLMHeadModel.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.XLMWithLMHeadModel.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.XLMWithLMHeadModel.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.XLMWithLMHeadModel.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for language modeling. Note that the labels <strong>are shifted</strong> inside the model, i.e. you can set
<code>labels = input_ids</code> Indices are selected in <code>[-100, 0, ..., config.vocab_size]</code> All labels set to <code>-100</code>
are ignored (masked), the loss is only computed for labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_15839/en/model_doc/xlm#transformers.XLMConfig"
>XLMConfig</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>
`}}),mo=new Ee({props:{$$slots:{default:[jb]},$$scope:{ctx:W}}}),pn=new nt({props:{code:`from transformers import XLMTokenizer, XLMWithLMHeadModel
import torch

tokenizer = XLMTokenizer.from_pretrained("xlm-mlm-en-2048")
model = XLMWithLMHeadModel.from_pretrained("xlm-mlm-en-2048")

inputs = tokenizer("The capital of France is <special1>.", 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> XLMTokenizer, XLMWithLMHeadModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = XLMTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMWithLMHeadModel.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is &lt;special1&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`}}),hn=new We({}),un=new ie({props:{name:"class transformers.FlaubertForSequenceClassification",anchor:"transformers.FlaubertForSequenceClassification",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/flaubert/modeling_flaubert.py#L348",parametersDescription:[{anchor:"transformers.FlaubertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</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"}]}}),bn=new ie({props:{name:"forward",anchor:"transformers.XLMForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"langs",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:"lengths",val:": typing.Optional[torch.Tensor] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, torch.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/xlm/modeling_xlm.py#L789",parametersDescription:[{anchor:"transformers.XLMForSequenceClassification.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/xlm#transformers.XLMTokenizer">XLMTokenizer</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.XLMForSequenceClassification.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.XLMForSequenceClassification.forward.langs",description:`<strong>langs</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.XLMForSequenceClassification.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.XLMForSequenceClassification.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.XLMForSequenceClassification.forward.lengths",description:`<strong>lengths</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.XLMForSequenceClassification.forward.cache",description:`<strong>cache</strong> (<code>Dict[str, torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.XLMForSequenceClassification.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.XLMForSequenceClassification.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.XLMForSequenceClassification.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.XLMForSequenceClassification.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.XLMForSequenceClassification.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.XLMForSequenceClassification.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/xlm#transformers.XLMConfig"
>XLMConfig</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>
`}}),go=new Ee({props:{$$slots:{default:[Xb]},$$scope:{ctx:W}}}),Tn=new nt({props:{code:`import torch
from transformers import XLMTokenizer, XLMForSequenceClassification

torch.manual_seed(0)
tokenizer = XLMTokenizer.from_pretrained("xlm-mlm-en-2048")
model = XLMForSequenceClassification.from_pretrained("xlm-mlm-en-2048", 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> XLMTokenizer, XLMForSequenceClassification

<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 = XLMTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&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)
`}}),vn=new nt({props:{code:`import torch
from transformers import XLMTokenizer, XLMForSequenceClassification

torch.manual_seed(0)
tokenizer = XLMTokenizer.from_pretrained("xlm-mlm-en-2048")
model = XLMForSequenceClassification.from_pretrained("xlm-mlm-en-2048", 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> XLMTokenizer, XLMForSequenceClassification

<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 = XLMTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&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)
`}}),kn=new We({}),wn=new ie({props:{name:"class transformers.FlaubertForMultipleChoice",anchor:"transformers.FlaubertForMultipleChoice",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/flaubert/modeling_flaubert.py#L436",parametersDescription:[{anchor:"transformers.FlaubertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),Ln=new ie({props:{name:"forward",anchor:"transformers.XLMForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"langs",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:"lengths",val:": typing.Optional[torch.Tensor] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, torch.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/xlm/modeling_xlm.py#L1202",parametersDescription:[{anchor:"transformers.XLMForMultipleChoice.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/xlm#transformers.XLMTokenizer">XLMTokenizer</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.XLMForMultipleChoice.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.XLMForMultipleChoice.forward.langs",description:`<strong>langs</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.XLMForMultipleChoice.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.XLMForMultipleChoice.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.XLMForMultipleChoice.forward.lengths",description:`<strong>lengths</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.XLMForMultipleChoice.forward.cache",description:`<strong>cache</strong> (<code>Dict[str, torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.XLMForMultipleChoice.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.XLMForMultipleChoice.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.XLMForMultipleChoice.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.XLMForMultipleChoice.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.XLMForMultipleChoice.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.XLMForMultipleChoice.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/xlm#transformers.XLMConfig"
>XLMConfig</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>
`}}),bo=new Ee({props:{$$slots:{default:[Ab]},$$scope:{ctx:W}}}),En=new nt({props:{code:`from transformers import XLMTokenizer, XLMForMultipleChoice
import torch

tokenizer = XLMTokenizer.from_pretrained("xlm-mlm-en-2048")
model = XLMForMultipleChoice.from_pretrained("xlm-mlm-en-2048")

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = XLMTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&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`}}),xn=new We({}),zn=new ie({props:{name:"class transformers.FlaubertForTokenClassification",anchor:"transformers.FlaubertForTokenClassification",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/flaubert/modeling_flaubert.py#L370",parametersDescription:[{anchor:"transformers.FlaubertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),Xn=new ie({props:{name:"forward",anchor:"transformers.XLMForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"langs",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:"lengths",val:": typing.Optional[torch.Tensor] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, torch.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/xlm/modeling_xlm.py#L1118",parametersDescription:[{anchor:"transformers.XLMForTokenClassification.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/xlm#transformers.XLMTokenizer">XLMTokenizer</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.XLMForTokenClassification.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.XLMForTokenClassification.forward.langs",description:`<strong>langs</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.XLMForTokenClassification.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.XLMForTokenClassification.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.XLMForTokenClassification.forward.lengths",description:`<strong>lengths</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.XLMForTokenClassification.forward.cache",description:`<strong>cache</strong> (<code>Dict[str, torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.XLMForTokenClassification.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.XLMForTokenClassification.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.XLMForTokenClassification.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.XLMForTokenClassification.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.XLMForTokenClassification.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.XLMForTokenClassification.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/xlm#transformers.XLMConfig"
>XLMConfig</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>
`}}),vo=new Ee({props:{$$slots:{default:[Sb]},$$scope:{ctx:W}}}),An=new nt({props:{code:`from transformers import XLMTokenizer, XLMForTokenClassification
import torch

tokenizer = XLMTokenizer.from_pretrained("xlm-mlm-en-2048")
model = XLMForTokenClassification.from_pretrained("xlm-mlm-en-2048")

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = XLMTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMForTokenClassification.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&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`}}),Sn=new We({}),Nn=new ie({props:{name:"class transformers.FlaubertForQuestionAnsweringSimple",anchor:"transformers.FlaubertForQuestionAnsweringSimple",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/flaubert/modeling_flaubert.py#L392",parametersDescription:[{anchor:"transformers.FlaubertForQuestionAnsweringSimple.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),Hn=new ie({props:{name:"forward",anchor:"transformers.XLMForQuestionAnsweringSimple.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"langs",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:"lengths",val:": typing.Optional[torch.Tensor] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, torch.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"start_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"end_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/xlm/modeling_xlm.py#L890",parametersDescription:[{anchor:"transformers.XLMForQuestionAnsweringSimple.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/xlm#transformers.XLMTokenizer">XLMTokenizer</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.XLMForQuestionAnsweringSimple.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.XLMForQuestionAnsweringSimple.forward.langs",description:`<strong>langs</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.XLMForQuestionAnsweringSimple.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.XLMForQuestionAnsweringSimple.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.XLMForQuestionAnsweringSimple.forward.lengths",description:`<strong>lengths</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.XLMForQuestionAnsweringSimple.forward.cache",description:`<strong>cache</strong> (<code>Dict[str, torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.XLMForQuestionAnsweringSimple.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.XLMForQuestionAnsweringSimple.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.XLMForQuestionAnsweringSimple.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.XLMForQuestionAnsweringSimple.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.XLMForQuestionAnsweringSimple.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.XLMForQuestionAnsweringSimple.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.XLMForQuestionAnsweringSimple.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/xlm#transformers.XLMConfig"
>XLMConfig</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>
`}}),wo=new Ee({props:{$$slots:{default:[Nb]},$$scope:{ctx:W}}}),Qn=new nt({props:{code:`from transformers import XLMTokenizer, XLMForQuestionAnsweringSimple
import torch

torch.manual_seed(0)
tokenizer = XLMTokenizer.from_pretrained("xlm-mlm-en-2048")
model = XLMForQuestionAnsweringSimple.from_pretrained("xlm-mlm-en-2048")

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> XLMTokenizer, XLMForQuestionAnsweringSimple
<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 = XLMTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMForQuestionAnsweringSimple.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&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)
`}}),Bn=new We({}),Rn=new ie({props:{name:"class transformers.FlaubertForQuestionAnswering",anchor:"transformers.FlaubertForQuestionAnswering",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/flaubert/modeling_flaubert.py#L414",parametersDescription:[{anchor:"transformers.FlaubertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</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"}]}}),Gn=new ie({props:{name:"forward",anchor:"transformers.XLMForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"langs",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:"lengths",val:": typing.Optional[torch.Tensor] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, torch.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"start_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"end_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"is_impossible",val:": typing.Optional[torch.Tensor] = None"},{name:"cls_index",val:": typing.Optional[torch.Tensor] = None"},{name:"p_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/xlm/modeling_xlm.py#L995",parametersDescription:[{anchor:"transformers.XLMForQuestionAnswering.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/xlm#transformers.XLMTokenizer">XLMTokenizer</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.XLMForQuestionAnswering.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.XLMForQuestionAnswering.forward.langs",description:`<strong>langs</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.XLMForQuestionAnswering.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.XLMForQuestionAnswering.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.XLMForQuestionAnswering.forward.lengths",description:`<strong>lengths</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.XLMForQuestionAnswering.forward.cache",description:`<strong>cache</strong> (<code>Dict[str, torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.XLMForQuestionAnswering.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.XLMForQuestionAnswering.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.XLMForQuestionAnswering.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.XLMForQuestionAnswering.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.XLMForQuestionAnswering.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.XLMForQuestionAnswering.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.XLMForQuestionAnswering.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"},{anchor:"transformers.XLMForQuestionAnswering.forward.is_impossible",description:`<strong>is_impossible</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels whether a question has an answer or no answer (SQuAD 2.0)`,name:"is_impossible"},{anchor:"transformers.XLMForQuestionAnswering.forward.cls_index",description:`<strong>cls_index</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the classification token to use as input for computing plausibility of the
answer.`,name:"cls_index"},{anchor:"transformers.XLMForQuestionAnswering.forward.p_mask",description:`<strong>p_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Optional mask of tokens which can&#x2019;t be in answers (e.g. [CLS], [PAD], &#x2026;). 1.0 means token should be
masked. 0.0 mean token is not masked.`,name:"p_mask"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/model_doc/xlm#transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput"
>transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput</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/xlm#transformers.XLMConfig"
>XLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned if both <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Classification loss as the sum of start token, end token (and is_impossible if provided) classification
losses.</p>
</li>
<li>
<p><strong>start_top_log_probs</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.start_n_top)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) \u2014 Log probabilities for the top config.start_n_top start token possibilities (beam-search).</p>
</li>
<li>
<p><strong>start_top_index</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, config.start_n_top)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) \u2014 Indices for the top config.start_n_top start token possibilities (beam-search).</p>
</li>
<li>
<p><strong>end_top_log_probs</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.start_n_top * config.end_n_top)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) \u2014 Log probabilities for the top <code>config.start_n_top * config.end_n_top</code> end token possibilities
(beam-search).</p>
</li>
<li>
<p><strong>end_top_index</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, config.start_n_top * config.end_n_top)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) \u2014 Indices for the top <code>config.start_n_top * config.end_n_top</code> end token possibilities (beam-search).</p>
</li>
<li>
<p><strong>cls_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) \u2014 Log probabilities for the <code>is_impossible</code> label of the answers.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_15839/en/model_doc/xlm#transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput"
>transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Fo=new Ee({props:{$$slots:{default:[Ob]},$$scope:{ctx:W}}}),Jn=new nt({props:{code:`from transformers import XLMTokenizer, XLMForQuestionAnswering
import torch

tokenizer = XLMTokenizer.from_pretrained("xlm-mlm-en-2048")
model = XLMForQuestionAnswering.from_pretrained("xlm-mlm-en-2048")

input_ids = torch.tensor(tokenizer.encode("Hello, my dog is cute", add_special_tokens=True)).unsqueeze(
    0
)  # Batch size 1
start_positions = torch.tensor([1])
end_positions = torch.tensor([3])

outputs = model(input_ids, start_positions=start_positions, end_positions=end_positions)
loss = outputs.loss`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> XLMTokenizer, XLMForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = XLMTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = torch.tensor(tokenizer.encode(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, add_special_tokens=<span class="hljs-literal">True</span>)).unsqueeze(
<span class="hljs-meta">... </span>    <span class="hljs-number">0</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>)  <span class="hljs-comment"># Batch size 1</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>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(input_ids, start_positions=start_positions, end_positions=end_positions)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss`}}),Zn=new We({}),es=new ie({props:{name:"class transformers.TFFlaubertModel",anchor:"transformers.TFFlaubertModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/flaubert/modeling_tf_flaubert.py#L232",parametersDescription:[{anchor:"transformers.TFFlaubertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</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"}]}}),$o=new Ee({props:{$$slots:{default:[Db]},$$scope:{ctx:W}}}),ss=new ie({props:{name:"call",anchor:"transformers.TFFlaubertModel.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"langs",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"lengths",val:" = None"},{name:"cache",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"training",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/flaubert/modeling_tf_flaubert.py#L237",parametersDescription:[{anchor:"transformers.TFFlaubertModel.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/flaubert#transformers.FlaubertTokenizer">FlaubertTokenizer</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.TFFlaubertModel.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><code>1</code> for tokens that are <strong>not masked</strong>,</li>
<li><code>0</code> 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.TFFlaubertModel.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFFlaubertModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</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><code>0</code> corresponds to a <em>sentence A</em> token,</li>
<li><code>1</code> 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.TFFlaubertModel.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</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.TFFlaubertModel.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>:`,name:"lengths"},{anchor:"transformers.TFFlaubertModel.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>tf.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFFlaubertModel.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><code>1</code> indicates the head is <strong>not masked</strong>,</li>
<li><code>0</code> indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFFlaubertModel.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.TFFlaubertModel.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.TFFlaubertModel.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.TFFlaubertModel.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.TFFlaubertModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</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/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</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>hidden_states</strong> (<code>tuple(tf.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Lo=new Ee({props:{$$slots:{default:[Ib]},$$scope:{ctx:W}}}),as=new nt({props:{code:`from transformers import FlaubertTokenizer, TFFlaubertModel
import tensorflow as tf

tokenizer = FlaubertTokenizer.from_pretrained("flaubert/flaubert_base_cased")
model = TFFlaubertModel.from_pretrained("flaubert/flaubert_base_cased")

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> FlaubertTokenizer, TFFlaubertModel
<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 = FlaubertTokenizer.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFFlaubertModel.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&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`}}),rs=new We({}),is=new ie({props:{name:"class transformers.TFFlaubertWithLMHeadModel",anchor:"transformers.TFFlaubertWithLMHeadModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/flaubert/modeling_tf_flaubert.py#L794",parametersDescription:[{anchor:"transformers.TFFlaubertWithLMHeadModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</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"}]}}),xo=new Ee({props:{$$slots:{default:[Wb]},$$scope:{ctx:W}}}),ps=new ie({props:{name:"call",anchor:"transformers.TFFlaubertWithLMHeadModel.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"langs",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"lengths",val:" = None"},{name:"cache",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"training",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/flaubert/modeling_tf_flaubert.py#L821",parametersDescription:[{anchor:"transformers.TFFlaubertWithLMHeadModel.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/flaubert#transformers.FlaubertTokenizer">FlaubertTokenizer</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.TFFlaubertWithLMHeadModel.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><code>1</code> for tokens that are <strong>not masked</strong>,</li>
<li><code>0</code> 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.TFFlaubertWithLMHeadModel.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</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><code>0</code> corresponds to a <em>sentence A</em> token,</li>
<li><code>1</code> 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.TFFlaubertWithLMHeadModel.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</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.TFFlaubertWithLMHeadModel.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>:`,name:"lengths"},{anchor:"transformers.TFFlaubertWithLMHeadModel.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>tf.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFFlaubertWithLMHeadModel.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><code>1</code> indicates the head is <strong>not masked</strong>,</li>
<li><code>0</code> indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFFlaubertWithLMHeadModel.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.TFFlaubertWithLMHeadModel.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.TFFlaubertWithLMHeadModel.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.TFFlaubertWithLMHeadModel.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.TFFlaubertWithLMHeadModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],returnDescription:`
<p>A <code>transformers.models.flaubert.modeling_tf_flaubert.TFFlaubertWithLMHeadModelOutput</code>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/flaubert#transformers.FlaubertConfig"
>FlaubertConfig</a>) and inputs.</p>
<ul>
<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><code>transformers.models.flaubert.modeling_tf_flaubert.TFFlaubertWithLMHeadModelOutput</code>or <code>tuple(tf.Tensor)</code></p>
`}}),zo=new Ee({props:{$$slots:{default:[Hb]},$$scope:{ctx:W}}}),hs=new nt({props:{code:`from transformers import FlaubertTokenizer, TFFlaubertWithLMHeadModel
import tensorflow as tf

tokenizer = FlaubertTokenizer.from_pretrained("flaubert/flaubert_base_cased")
model = TFFlaubertWithLMHeadModel.from_pretrained("flaubert/flaubert_base_cased")

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> FlaubertTokenizer, TFFlaubertWithLMHeadModel
<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 = FlaubertTokenizer.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFFlaubertWithLMHeadModel.from_pretrained(<span class="hljs-string">&quot;flaubert/flaubert_base_cased&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`}}),us=new We({}),ms=new ie({props:{name:"class transformers.TFFlaubertForSequenceClassification",anchor:"transformers.TFFlaubertForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/flaubert/modeling_tf_flaubert.py#L902",parametersDescription:[{anchor:"transformers.TFFlaubertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</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"}]}}),Co=new Ee({props:{$$slots:{default:[Qb]},$$scope:{ctx:W}}}),bs=new ie({props:{name:"call",anchor:"transformers.TFXLMForSequenceClassification.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"langs",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"lengths",val:" = None"},{name:"cache",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"labels",val:" = None"},{name:"training",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/xlm/modeling_tf_xlm.py#L947",parametersDescription:[{anchor:"transformers.TFXLMForSequenceClassification.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/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLMForSequenceClassification.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.TFXLMForSequenceClassification.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFXLMForSequenceClassification.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.TFXLMForSequenceClassification.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.TFXLMForSequenceClassification.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.TFXLMForSequenceClassification.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFXLMForSequenceClassification.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.TFXLMForSequenceClassification.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.TFXLMForSequenceClassification.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.TFXLMForSequenceClassification.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.TFXLMForSequenceClassification.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.TFXLMForSequenceClassification.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.TFXLMForSequenceClassification.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/xlm#transformers.XLMConfig"
>XLMConfig</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>
`}}),Po=new Ee({props:{$$slots:{default:[Bb]},$$scope:{ctx:W}}}),Ts=new nt({props:{code:`from transformers import XLMTokenizer, TFXLMForSequenceClassification
import tensorflow as tf

tokenizer = XLMTokenizer.from_pretrained("xlm-mlm-en-2048")
model = TFXLMForSequenceClassification.from_pretrained("xlm-mlm-en-2048")

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> XLMTokenizer, TFXLMForSequenceClassification
<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 = XLMTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXLMForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&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`}}),vs=new We({}),ks=new ie({props:{name:"class transformers.TFFlaubertForMultipleChoice",anchor:"transformers.TFFlaubertForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/flaubert/modeling_tf_flaubert.py#L947",parametersDescription:[{anchor:"transformers.TFFlaubertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</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"}]}}),Xo=new Ee({props:{$$slots:{default:[Rb]},$$scope:{ctx:W}}}),Ms=new ie({props:{name:"call",anchor:"transformers.TFXLMForMultipleChoice.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"langs",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"lengths",val:" = None"},{name:"cache",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"labels",val:" = None"},{name:"training",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/xlm/modeling_tf_xlm.py#L1073",parametersDescription:[{anchor:"transformers.TFXLMForMultipleChoice.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/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLMForMultipleChoice.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.TFXLMForMultipleChoice.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFXLMForMultipleChoice.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.TFXLMForMultipleChoice.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.TFXLMForMultipleChoice.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.TFXLMForMultipleChoice.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFXLMForMultipleChoice.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.TFXLMForMultipleChoice.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.TFXLMForMultipleChoice.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.TFXLMForMultipleChoice.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.TFXLMForMultipleChoice.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.TFXLMForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/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/xlm#transformers.XLMConfig"
>XLMConfig</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>
`}}),Ao=new Ee({props:{$$slots:{default:[Ub]},$$scope:{ctx:W}}}),$s=new nt({props:{code:`from transformers import XLMTokenizer, TFXLMForMultipleChoice
import tensorflow as tf

tokenizer = XLMTokenizer.from_pretrained("xlm-mlm-en-2048")
model = TFXLMForMultipleChoice.from_pretrained("xlm-mlm-en-2048")

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> XLMTokenizer, TFXLMForMultipleChoice
<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 = XLMTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXLMForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&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`}}),Ls=new We({}),Es=new ie({props:{name:"class transformers.TFFlaubertForTokenClassification",anchor:"transformers.TFFlaubertForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/flaubert/modeling_tf_flaubert.py#L932",parametersDescription:[{anchor:"transformers.TFFlaubertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</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"}]}}),No=new Ee({props:{$$slots:{default:[Vb]},$$scope:{ctx:W}}}),Cs=new ie({props:{name:"call",anchor:"transformers.TFXLMForTokenClassification.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"langs",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"lengths",val:" = None"},{name:"cache",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"labels",val:" = None"},{name:"training",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/xlm/modeling_tf_xlm.py#L1223",parametersDescription:[{anchor:"transformers.TFXLMForTokenClassification.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/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLMForTokenClassification.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.TFXLMForTokenClassification.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFXLMForTokenClassification.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.TFXLMForTokenClassification.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.TFXLMForTokenClassification.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.TFXLMForTokenClassification.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFXLMForTokenClassification.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.TFXLMForTokenClassification.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.TFXLMForTokenClassification.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.TFXLMForTokenClassification.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.TFXLMForTokenClassification.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.TFXLMForTokenClassification.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.TFXLMForTokenClassification.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/xlm#transformers.XLMConfig"
>XLMConfig</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>
`}}),Oo=new Ee({props:{$$slots:{default:[Yb]},$$scope:{ctx:W}}}),Ps=new nt({props:{code:`from transformers import XLMTokenizer, TFXLMForTokenClassification
import tensorflow as tf

tokenizer = XLMTokenizer.from_pretrained("xlm-mlm-en-2048")
model = TFXLMForTokenClassification.from_pretrained("xlm-mlm-en-2048")

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> XLMTokenizer, TFXLMForTokenClassification
<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 = XLMTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXLMForTokenClassification.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&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`}}),js=new We({}),Xs=new ie({props:{name:"class transformers.TFFlaubertForQuestionAnsweringSimple",anchor:"transformers.TFFlaubertForQuestionAnsweringSimple",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/flaubert/modeling_tf_flaubert.py#L917",parametersDescription:[{anchor:"transformers.TFFlaubertForQuestionAnsweringSimple.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/flaubert#transformers.FlaubertConfig">FlaubertConfig</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"}]}}),Io=new Ee({props:{$$slots:{default:[Kb]},$$scope:{ctx:W}}}),Os=new ie({props:{name:"call",anchor:"transformers.TFXLMForQuestionAnsweringSimple.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"langs",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"lengths",val:" = None"},{name:"cache",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"start_positions",val:" = None"},{name:"end_positions",val:" = None"},{name:"training",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/xlm/modeling_tf_xlm.py#L1327",parametersDescription:[{anchor:"transformers.TFXLMForQuestionAnsweringSimple.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/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLMForQuestionAnsweringSimple.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.TFXLMForQuestionAnsweringSimple.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFXLMForQuestionAnsweringSimple.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.TFXLMForQuestionAnsweringSimple.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.TFXLMForQuestionAnsweringSimple.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.TFXLMForQuestionAnsweringSimple.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFXLMForQuestionAnsweringSimple.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.TFXLMForQuestionAnsweringSimple.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.TFXLMForQuestionAnsweringSimple.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.TFXLMForQuestionAnsweringSimple.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.TFXLMForQuestionAnsweringSimple.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.TFXLMForQuestionAnsweringSimple.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.TFXLMForQuestionAnsweringSimple.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.TFXLMForQuestionAnsweringSimple.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/xlm#transformers.XLMConfig"
>XLMConfig</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>
`}}),Wo=new Ee({props:{$$slots:{default:[Gb]},$$scope:{ctx:W}}}),Ds=new nt({props:{code:`from transformers import XLMTokenizer, TFXLMForQuestionAnsweringSimple
import tensorflow as tf

tokenizer = XLMTokenizer.from_pretrained("xlm-mlm-en-2048")
model = TFXLMForQuestionAnsweringSimple.from_pretrained("xlm-mlm-en-2048")

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> XLMTokenizer, TFXLMForQuestionAnsweringSimple
<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 = XLMTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXLMForQuestionAnsweringSimple.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>input_dict = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(input_dict)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_logits = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>end_logits = outputs.end_logits

<span class="hljs-meta">&gt;&gt;&gt; </span>all_tokens = tokenizer.convert_ids_to_tokens(input_dict[<span class="hljs-string">&quot;input_ids&quot;</span>].numpy()[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>answer = <span class="hljs-string">&quot; &quot;</span>.join(all_tokens[tf.math.argmax(start_logits, <span class="hljs-number">1</span>)[<span class="hljs-number">0</span>] : tf.math.argmax(end_logits, <span class="hljs-number">1</span>)[<span class="hljs-number">0</span>] + <span class="hljs-number">1</span>])`}}),{c(){p=a("meta"),v=l(),m=a("h1"),g=a("a"),T=a("span"),y(b.$$.fragment),f=l(),w=a("span"),le=o("FlauBERT"),Y=l(),x=a("h2"),J=a("a"),H=a("span"),y(Z.$$.fragment),de=l(),Q=a("span"),ce=o("Overview"),se=l(),U=a("p"),X=o("The FlauBERT model was proposed in the paper "),ee=a("a"),K=o("FlauBERT: Unsupervised Language Model Pre-training for French"),z=o(` by Hang Le et al. It\u2019s a transformer model pretrained using a masked language
modeling (MLM) objective (like BERT).`),C=l(),te=a("p"),R=o("The abstract from the paper is the following:"),ae=l(),oe=a("p"),B=a("em"),pe=o(`Language models have become a key step to achieve state-of-the art results in many different Natural Language
Processing (NLP) tasks. Leveraging the huge amount of unlabeled texts nowadays available, they provide an efficient way
to pre-train continuous word representations that can be fine-tuned for a downstream task, along with their
contextualization at the sentence level. This has been widely demonstrated for English using contextualized
representations (Dai and Le, 2015; Peters et al., 2018; Howard and Ruder, 2018; Radford et al., 2018; Devlin et al.,
2019; Yang et al., 2019b). In this paper, we introduce and share FlauBERT, a model learned on a very large and
heterogeneous French corpus. Models of different sizes are trained using the new CNRS (French National Centre for
Scientific Research) Jean Zay supercomputer. We apply our French language models to diverse NLP tasks (text
classification, paraphrasing, natural language inference, parsing, word sense disambiguation) and show that most of the
time they outperform other pretraining approaches. Different versions of FlauBERT as well as a unified evaluation
protocol for the downstream tasks, called FLUE (French Language Understanding Evaluation), are shared to the research
community for further reproducible experiments in French NLP.`),re=l(),q=a("p"),he=o("This model was contributed by "),N=a("a"),ue=o("formiel"),me=o(". The original code can be found "),O=a("a"),fe=o("here"),ge=o("."),j=l(),G=a("h2"),S=a("a"),ne=a("span"),y(c.$$.fragment),k=l(),V=a("span"),we=o("FlaubertConfig"),ke=l(),P=a("div"),y(ve.$$.fragment),ye=l(),_e=a("p"),A=o("This is the configuration class to store the configuration of a "),D=a("a"),Fe=o("FlaubertModel"),Me=o(" or a "),I=a("a"),$e=o("TFFlaubertModel"),Le=o(`. It is
used to instantiate a FlauBERT model according to the specified arguments, defining the model architecture.`),be=l(),Te=a("p"),Jl=o("Configuration objects inherit from "),Bs=a("a"),Zl=o("PretrainedConfig"),ed=o(` and can be used to control the model outputs. Read the
documentation from `),Rs=a("a"),td=o("PretrainedConfig"),od=o(" for more information."),xi=l(),Ct=a("h2"),co=a("a"),Ba=a("span"),y(Ro.$$.fragment),nd=l(),Ra=a("span"),sd=o("FlaubertTokenizer"),zi=l(),st=a("div"),y(Uo.$$.fragment),ad=l(),Ua=a("p"),rd=o("Construct a Flaubert tokenizer. Based on Byte-Pair Encoding. The tokenization process is the following:"),id=l(),_t=a("ul"),Va=a("li"),ld=o("Moses preprocessing and tokenization."),dd=l(),Ya=a("li"),cd=o("Normalizing all inputs text."),pd=l(),bt=a("li"),hd=o("The arguments "),Ka=a("code"),ud=o("special_tokens"),md=o(" and the function "),Ga=a("code"),fd=o("set_special_tokens"),gd=o(`, can be used to add additional symbols (like
\u201D`),Ja=a("strong"),_d=o("classify"),bd=o("\u201D) to a vocabulary."),Td=l(),Vo=a("li"),vd=o("The argument "),Za=a("code"),kd=o("do_lowercase"),wd=o(" controls lower casing (automatically set for pretrained vocabularies)."),yd=l(),Yo=a("p"),Fd=o("This tokenizer inherits from "),Us=a("a"),Md=o("XLMTokenizer"),$d=o(`. Please check the superclass for usage examples and documentation
regarding arguments.`),qi=l(),Pt=a("h2"),po=a("a"),er=a("span"),y(Ko.$$.fragment),Ld=l(),tr=a("span"),Ed=o("FlaubertModel"),Ci=l(),He=a("div"),y(Go.$$.fragment),xd=l(),or=a("p"),zd=o("The bare Flaubert Model transformer outputting raw hidden-states without any specific head on top."),qd=l(),Jo=a("p"),Cd=o("This model inherits from "),Vs=a("a"),Pd=o("PreTrainedModel"),jd=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Xd=l(),Zo=a("p"),Ad=o("This model is also a PyTorch "),en=a("a"),Sd=o("torch.nn.Module"),Nd=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Od=l(),Qe=a("div"),y(tn.$$.fragment),Dd=l(),jt=a("p"),Id=o("The "),Ys=a("a"),Wd=o("FlaubertModel"),Hd=o(" forward method, overrides the "),nr=a("code"),Qd=o("__call__"),Bd=o(" special method."),Rd=l(),y(ho.$$.fragment),Ud=l(),sr=a("p"),Vd=o("Example:"),Yd=l(),y(on.$$.fragment),Pi=l(),Xt=a("h2"),uo=a("a"),ar=a("span"),y(nn.$$.fragment),Kd=l(),rr=a("span"),Gd=o("FlaubertWithLMHeadModel"),ji=l(),ze=a("div"),y(sn.$$.fragment),Jd=l(),ir=a("p"),Zd=o(`The Flaubert Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),ec=l(),an=a("p"),tc=o("This model inherits from "),Ks=a("a"),oc=o("PreTrainedModel"),nc=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),sc=l(),rn=a("p"),ac=o("This model is also a PyTorch "),ln=a("a"),rc=o("torch.nn.Module"),ic=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),lc=l(),dn=a("p"),dc=o("This class overrides "),Gs=a("a"),cc=o("XLMWithLMHeadModel"),pc=o(`. Please check the superclass for the appropriate documentation
alongside usage examples.`),hc=l(),Be=a("div"),y(cn.$$.fragment),uc=l(),At=a("p"),mc=o("The "),Js=a("a"),fc=o("XLMWithLMHeadModel"),gc=o(" forward method, overrides the "),lr=a("code"),_c=o("__call__"),bc=o(" special method."),Tc=l(),y(mo.$$.fragment),vc=l(),dr=a("p"),kc=o("Example:"),wc=l(),y(pn.$$.fragment),Xi=l(),St=a("h2"),fo=a("a"),cr=a("span"),y(hn.$$.fragment),yc=l(),pr=a("span"),Fc=o("FlaubertForSequenceClassification"),Ai=l(),qe=a("div"),y(un.$$.fragment),Mc=l(),hr=a("p"),$c=o(`Flaubert Model with a sequence classification/regression head on top (a linear layer on top of the pooled output)
e.g. for GLUE tasks.`),Lc=l(),mn=a("p"),Ec=o("This model inherits from "),Zs=a("a"),xc=o("PreTrainedModel"),zc=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),qc=l(),fn=a("p"),Cc=o("This model is also a PyTorch "),gn=a("a"),Pc=o("torch.nn.Module"),jc=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Xc=l(),_n=a("p"),Ac=o("This class overrides "),ea=a("a"),Sc=o("XLMForSequenceClassification"),Nc=o(`. Please check the superclass for the appropriate
documentation alongside usage examples.`),Oc=l(),xe=a("div"),y(bn.$$.fragment),Dc=l(),Nt=a("p"),Ic=o("The "),ta=a("a"),Wc=o("XLMForSequenceClassification"),Hc=o(" forward method, overrides the "),ur=a("code"),Qc=o("__call__"),Bc=o(" special method."),Rc=l(),y(go.$$.fragment),Uc=l(),mr=a("p"),Vc=o("Example of single-label classification:"),Yc=l(),y(Tn.$$.fragment),Kc=l(),fr=a("p"),Gc=o("Example of multi-label classification:"),Jc=l(),y(vn.$$.fragment),Si=l(),Ot=a("h2"),_o=a("a"),gr=a("span"),y(kn.$$.fragment),Zc=l(),_r=a("span"),ep=o("FlaubertForMultipleChoice"),Ni=l(),Ce=a("div"),y(wn.$$.fragment),tp=l(),br=a("p"),op=o(`Flaubert 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.`),np=l(),yn=a("p"),sp=o("This model inherits from "),oa=a("a"),ap=o("PreTrainedModel"),rp=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),ip=l(),Fn=a("p"),lp=o("This model is also a PyTorch "),Mn=a("a"),dp=o("torch.nn.Module"),cp=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),pp=l(),$n=a("p"),hp=o("This class overrides "),na=a("a"),up=o("XLMForMultipleChoice"),mp=o(`. Please check the superclass for the appropriate documentation
alongside usage examples.`),fp=l(),Re=a("div"),y(Ln.$$.fragment),gp=l(),Dt=a("p"),_p=o("The "),sa=a("a"),bp=o("XLMForMultipleChoice"),Tp=o(" forward method, overrides the "),Tr=a("code"),vp=o("__call__"),kp=o(" special method."),wp=l(),y(bo.$$.fragment),yp=l(),vr=a("p"),Fp=o("Example:"),Mp=l(),y(En.$$.fragment),Oi=l(),It=a("h2"),To=a("a"),kr=a("span"),y(xn.$$.fragment),$p=l(),wr=a("span"),Lp=o("FlaubertForTokenClassification"),Di=l(),Pe=a("div"),y(zn.$$.fragment),Ep=l(),yr=a("p"),xp=o(`Flaubert 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.`),zp=l(),qn=a("p"),qp=o("This model inherits from "),aa=a("a"),Cp=o("PreTrainedModel"),Pp=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),jp=l(),Cn=a("p"),Xp=o("This model is also a PyTorch "),Pn=a("a"),Ap=o("torch.nn.Module"),Sp=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Np=l(),jn=a("p"),Op=o("This class overrides "),ra=a("a"),Dp=o("XLMForTokenClassification"),Ip=o(`. Please check the superclass for the appropriate documentation
alongside usage examples.`),Wp=l(),Ue=a("div"),y(Xn.$$.fragment),Hp=l(),Wt=a("p"),Qp=o("The "),ia=a("a"),Bp=o("XLMForTokenClassification"),Rp=o(" forward method, overrides the "),Fr=a("code"),Up=o("__call__"),Vp=o(" special method."),Yp=l(),y(vo.$$.fragment),Kp=l(),Mr=a("p"),Gp=o("Example:"),Jp=l(),y(An.$$.fragment),Ii=l(),Ht=a("h2"),ko=a("a"),$r=a("span"),y(Sn.$$.fragment),Zp=l(),Lr=a("span"),eh=o("FlaubertForQuestionAnsweringSimple"),Wi=l(),je=a("div"),y(Nn.$$.fragment),th=l(),Qt=a("p"),oh=o(`Flaubert 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 `),Er=a("code"),nh=o("span start logits"),sh=o(" and "),xr=a("code"),ah=o("span end logits"),rh=o(")."),ih=l(),On=a("p"),lh=o("This model inherits from "),la=a("a"),dh=o("PreTrainedModel"),ch=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),ph=l(),Dn=a("p"),hh=o("This model is also a PyTorch "),In=a("a"),uh=o("torch.nn.Module"),mh=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),fh=l(),Wn=a("p"),gh=o("This class overrides "),da=a("a"),_h=o("XLMForQuestionAnsweringSimple"),bh=o(`. Please check the superclass for the appropriate
documentation alongside usage examples.`),Th=l(),Ve=a("div"),y(Hn.$$.fragment),vh=l(),Bt=a("p"),kh=o("The "),ca=a("a"),wh=o("XLMForQuestionAnsweringSimple"),yh=o(" forward method, overrides the "),zr=a("code"),Fh=o("__call__"),Mh=o(" special method."),$h=l(),y(wo.$$.fragment),Lh=l(),qr=a("p"),Eh=o("Example:"),xh=l(),y(Qn.$$.fragment),Hi=l(),Rt=a("h2"),yo=a("a"),Cr=a("span"),y(Bn.$$.fragment),zh=l(),Pr=a("span"),qh=o("FlaubertForQuestionAnswering"),Qi=l(),Xe=a("div"),y(Rn.$$.fragment),Ch=l(),Ut=a("p"),Ph=o(`Flaubert Model with a beam-search span classification head on top for extractive question-answering tasks like
SQuAD (a linear layers on top of the hidden-states output to compute `),jr=a("code"),jh=o("span start logits"),Xh=o(" and "),Xr=a("code"),Ah=o("span end logits"),Sh=o(")."),Nh=l(),Un=a("p"),Oh=o("This model inherits from "),pa=a("a"),Dh=o("PreTrainedModel"),Ih=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Wh=l(),Vn=a("p"),Hh=o("This model is also a PyTorch "),Yn=a("a"),Qh=o("torch.nn.Module"),Bh=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Rh=l(),Kn=a("p"),Uh=o("This class overrides "),ha=a("a"),Vh=o("XLMForQuestionAnswering"),Yh=o(`. Please check the superclass for the appropriate documentation
alongside usage examples.`),Kh=l(),Ye=a("div"),y(Gn.$$.fragment),Gh=l(),Vt=a("p"),Jh=o("The "),ua=a("a"),Zh=o("XLMForQuestionAnswering"),eu=o(" forward method, overrides the "),Ar=a("code"),tu=o("__call__"),ou=o(" special method."),nu=l(),y(Fo.$$.fragment),su=l(),Sr=a("p"),au=o("Example:"),ru=l(),y(Jn.$$.fragment),Bi=l(),Yt=a("h2"),Mo=a("a"),Nr=a("span"),y(Zn.$$.fragment),iu=l(),Or=a("span"),lu=o("TFFlaubertModel"),Ri=l(),Ae=a("div"),y(es.$$.fragment),du=l(),Dr=a("p"),cu=o("The bare Flaubert Model transformer outputting raw hidden-states without any specific head on top."),pu=l(),ts=a("p"),hu=o("This model inherits from "),ma=a("a"),uu=o("TFPreTrainedModel"),mu=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),fu=l(),os=a("p"),gu=o("This model is also a "),ns=a("a"),_u=o("tf.keras.Model"),bu=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Tu=l(),y($o.$$.fragment),vu=l(),Ke=a("div"),y(ss.$$.fragment),ku=l(),Kt=a("p"),wu=o("The "),fa=a("a"),yu=o("TFFlaubertModel"),Fu=o(" forward method, overrides the "),Ir=a("code"),Mu=o("__call__"),$u=o(" special method."),Lu=l(),y(Lo.$$.fragment),Eu=l(),Wr=a("p"),xu=o("Example:"),zu=l(),y(as.$$.fragment),Ui=l(),Gt=a("h2"),Eo=a("a"),Hr=a("span"),y(rs.$$.fragment),qu=l(),Qr=a("span"),Cu=o("TFFlaubertWithLMHeadModel"),Vi=l(),Se=a("div"),y(is.$$.fragment),Pu=l(),Br=a("p"),ju=o(`The Flaubert Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),Xu=l(),ls=a("p"),Au=o("This model inherits from "),ga=a("a"),Su=o("TFPreTrainedModel"),Nu=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Ou=l(),ds=a("p"),Du=o("This model is also a "),cs=a("a"),Iu=o("tf.keras.Model"),Wu=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Hu=l(),y(xo.$$.fragment),Qu=l(),Ge=a("div"),y(ps.$$.fragment),Bu=l(),Jt=a("p"),Ru=o("The "),_a=a("a"),Uu=o("TFFlaubertWithLMHeadModel"),Vu=o(" forward method, overrides the "),Rr=a("code"),Yu=o("__call__"),Ku=o(" special method."),Gu=l(),y(zo.$$.fragment),Ju=l(),Ur=a("p"),Zu=o("Example:"),em=l(),y(hs.$$.fragment),Yi=l(),Zt=a("h2"),qo=a("a"),Vr=a("span"),y(us.$$.fragment),tm=l(),Yr=a("span"),om=o("TFFlaubertForSequenceClassification"),Ki=l(),Ne=a("div"),y(ms.$$.fragment),nm=l(),Kr=a("p"),sm=o(`Flaubert Model with a sequence classification/regression head on top (a linear layer on top of the pooled output)
e.g. for GLUE tasks.`),am=l(),fs=a("p"),rm=o("This model inherits from "),ba=a("a"),im=o("TFPreTrainedModel"),lm=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),dm=l(),gs=a("p"),cm=o("This model is also a "),_s=a("a"),pm=o("tf.keras.Model"),hm=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),um=l(),y(Co.$$.fragment),mm=l(),Je=a("div"),y(bs.$$.fragment),fm=l(),eo=a("p"),gm=o("The "),Ta=a("a"),_m=o("TFXLMForSequenceClassification"),bm=o(" forward method, overrides the "),Gr=a("code"),Tm=o("__call__"),vm=o(" special method."),km=l(),y(Po.$$.fragment),wm=l(),Jr=a("p"),ym=o("Example:"),Fm=l(),y(Ts.$$.fragment),Gi=l(),to=a("h2"),jo=a("a"),Zr=a("span"),y(vs.$$.fragment),Mm=l(),ei=a("span"),$m=o("TFFlaubertForMultipleChoice"),Ji=l(),Oe=a("div"),y(ks.$$.fragment),Lm=l(),ti=a("p"),Em=o(`Flaubert 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.`),xm=l(),ws=a("p"),zm=o("This model inherits from "),va=a("a"),qm=o("TFPreTrainedModel"),Cm=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Pm=l(),ys=a("p"),jm=o("This model is also a "),Fs=a("a"),Xm=o("tf.keras.Model"),Am=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Sm=l(),y(Xo.$$.fragment),Nm=l(),Ze=a("div"),y(Ms.$$.fragment),Om=l(),oo=a("p"),Dm=o("The "),ka=a("a"),Im=o("TFXLMForMultipleChoice"),Wm=o(" forward method, overrides the "),oi=a("code"),Hm=o("__call__"),Qm=o(" special method."),Bm=l(),y(Ao.$$.fragment),Rm=l(),ni=a("p"),Um=o("Example:"),Vm=l(),y($s.$$.fragment),Zi=l(),no=a("h2"),So=a("a"),si=a("span"),y(Ls.$$.fragment),Ym=l(),ai=a("span"),Km=o("TFFlaubertForTokenClassification"),el=l(),De=a("div"),y(Es.$$.fragment),Gm=l(),ri=a("p"),Jm=o(`Flaubert 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.`),Zm=l(),xs=a("p"),ef=o("This model inherits from "),wa=a("a"),tf=o("TFPreTrainedModel"),of=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),nf=l(),zs=a("p"),sf=o("This model is also a "),qs=a("a"),af=o("tf.keras.Model"),rf=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),lf=l(),y(No.$$.fragment),df=l(),et=a("div"),y(Cs.$$.fragment),cf=l(),so=a("p"),pf=o("The "),ya=a("a"),hf=o("TFXLMForTokenClassification"),uf=o(" forward method, overrides the "),ii=a("code"),mf=o("__call__"),ff=o(" special method."),gf=l(),y(Oo.$$.fragment),_f=l(),li=a("p"),bf=o("Example:"),Tf=l(),y(Ps.$$.fragment),tl=l(),ao=a("h2"),Do=a("a"),di=a("span"),y(js.$$.fragment),vf=l(),ci=a("span"),kf=o("TFFlaubertForQuestionAnsweringSimple"),ol=l(),Ie=a("div"),y(Xs.$$.fragment),wf=l(),ro=a("p"),yf=o(`Flaubert Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layer on top of the hidden-states output to compute `),pi=a("code"),Ff=o("span start logits"),Mf=o(" and "),hi=a("code"),$f=o("span end logits"),Lf=o(")."),Ef=l(),As=a("p"),xf=o("This model inherits from "),Fa=a("a"),zf=o("TFPreTrainedModel"),qf=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Cf=l(),Ss=a("p"),Pf=o("This model is also a "),Ns=a("a"),jf=o("tf.keras.Model"),Xf=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Af=l(),y(Io.$$.fragment),Sf=l(),tt=a("div"),y(Os.$$.fragment),Nf=l(),io=a("p"),Of=o("The "),Ma=a("a"),Df=o("TFXLMForQuestionAnsweringSimple"),If=o(" forward method, overrides the "),ui=a("code"),Wf=o("__call__"),Hf=o(" special method."),Qf=l(),y(Wo.$$.fragment),Bf=l(),mi=a("p"),Rf=o("Example:"),Uf=l(),y(Ds.$$.fragment),this.h()},l(s){const _=Cb('[data-svelte="svelte-1phssyn"]',document.head);p=r(_,"META",{name:!0,content:!0}),_.forEach(t),v=d(s),m=r(s,"H1",{class:!0});var Is=i(m);g=r(Is,"A",{id:!0,class:!0,href:!0});var fi=i(g);T=r(fi,"SPAN",{});var gi=i(T);F(b.$$.fragment,gi),gi.forEach(t),fi.forEach(t),f=d(Is),w=r(Is,"SPAN",{});var _i=i(w);le=n(_i,"FlauBERT"),_i.forEach(t),Is.forEach(t),Y=d(s),x=r(s,"H2",{class:!0});var Ws=i(x);J=r(Ws,"A",{id:!0,class:!0,href:!0});var bi=i(J);H=r(bi,"SPAN",{});var Ti=i(H);F(Z.$$.fragment,Ti),Ti.forEach(t),bi.forEach(t),de=d(Ws),Q=r(Ws,"SPAN",{});var vi=i(Q);ce=n(vi,"Overview"),vi.forEach(t),Ws.forEach(t),se=d(s),U=r(s,"P",{});var Hs=i(U);X=n(Hs,"The FlauBERT model was proposed in the paper "),ee=r(Hs,"A",{href:!0,rel:!0});var ki=i(ee);K=n(ki,"FlauBERT: Unsupervised Language Model Pre-training for French"),ki.forEach(t),z=n(Hs,` by Hang Le et al. It\u2019s a transformer model pretrained using a masked language
modeling (MLM) objective (like BERT).`),Hs.forEach(t),C=d(s),te=r(s,"P",{});var wi=i(te);R=n(wi,"The abstract from the paper is the following:"),wi.forEach(t),ae=d(s),oe=r(s,"P",{});var yi=i(oe);B=r(yi,"EM",{});var Fi=i(B);pe=n(Fi,`Language models have become a key step to achieve state-of-the art results in many different Natural Language
Processing (NLP) tasks. Leveraging the huge amount of unlabeled texts nowadays available, they provide an efficient way
to pre-train continuous word representations that can be fine-tuned for a downstream task, along with their
contextualization at the sentence level. This has been widely demonstrated for English using contextualized
representations (Dai and Le, 2015; Peters et al., 2018; Howard and Ruder, 2018; Radford et al., 2018; Devlin et al.,
2019; Yang et al., 2019b). In this paper, we introduce and share FlauBERT, a model learned on a very large and
heterogeneous French corpus. Models of different sizes are trained using the new CNRS (French National Centre for
Scientific Research) Jean Zay supercomputer. We apply our French language models to diverse NLP tasks (text
classification, paraphrasing, natural language inference, parsing, word sense disambiguation) and show that most of the
time they outperform other pretraining approaches. Different versions of FlauBERT as well as a unified evaluation
protocol for the downstream tasks, called FLUE (French Language Understanding Evaluation), are shared to the research
community for further reproducible experiments in French NLP.`),Fi.forEach(t),yi.forEach(t),re=d(s),q=r(s,"P",{});var lo=i(q);he=n(lo,"This model was contributed by "),N=r(lo,"A",{href:!0,rel:!0});var Mi=i(N);ue=n(Mi,"formiel"),Mi.forEach(t),me=n(lo,". The original code can be found "),O=r(lo,"A",{href:!0,rel:!0});var $i=i(O);fe=n($i,"here"),$i.forEach(t),ge=n(lo,"."),lo.forEach(t),j=d(s),G=r(s,"H2",{class:!0});var Qs=i(G);S=r(Qs,"A",{id:!0,class:!0,href:!0});var Li=i(S);ne=r(Li,"SPAN",{});var Ei=i(ne);F(c.$$.fragment,Ei),Ei.forEach(t),Li.forEach(t),k=d(Qs),V=r(Qs,"SPAN",{});var Vf=i(V);we=n(Vf,"FlaubertConfig"),Vf.forEach(t),Qs.forEach(t),ke=d(s),P=r(s,"DIV",{class:!0});var $a=i(P);F(ve.$$.fragment,$a),ye=d($a),_e=r($a,"P",{});var La=i(_e);A=n(La,"This is the configuration class to store the configuration of a "),D=r(La,"A",{href:!0});var Yf=i(D);Fe=n(Yf,"FlaubertModel"),Yf.forEach(t),Me=n(La," or a "),I=r(La,"A",{href:!0});var Kf=i(I);$e=n(Kf,"TFFlaubertModel"),Kf.forEach(t),Le=n(La,`. It is
used to instantiate a FlauBERT model according to the specified arguments, defining the model architecture.`),La.forEach(t),be=d($a),Te=r($a,"P",{});var Ea=i(Te);Jl=n(Ea,"Configuration objects inherit from "),Bs=r(Ea,"A",{href:!0});var Gf=i(Bs);Zl=n(Gf,"PretrainedConfig"),Gf.forEach(t),ed=n(Ea,` and can be used to control the model outputs. Read the
documentation from `),Rs=r(Ea,"A",{href:!0});var Jf=i(Rs);td=n(Jf,"PretrainedConfig"),Jf.forEach(t),od=n(Ea," for more information."),Ea.forEach(t),$a.forEach(t),xi=d(s),Ct=r(s,"H2",{class:!0});var sl=i(Ct);co=r(sl,"A",{id:!0,class:!0,href:!0});var Zf=i(co);Ba=r(Zf,"SPAN",{});var eg=i(Ba);F(Ro.$$.fragment,eg),eg.forEach(t),Zf.forEach(t),nd=d(sl),Ra=r(sl,"SPAN",{});var tg=i(Ra);sd=n(tg,"FlaubertTokenizer"),tg.forEach(t),sl.forEach(t),zi=d(s),st=r(s,"DIV",{class:!0});var Ho=i(st);F(Uo.$$.fragment,Ho),ad=d(Ho),Ua=r(Ho,"P",{});var og=i(Ua);rd=n(og,"Construct a Flaubert tokenizer. Based on Byte-Pair Encoding. The tokenization process is the following:"),og.forEach(t),id=d(Ho),_t=r(Ho,"UL",{});var Qo=i(_t);Va=r(Qo,"LI",{});var ng=i(Va);ld=n(ng,"Moses preprocessing and tokenization."),ng.forEach(t),dd=d(Qo),Ya=r(Qo,"LI",{});var sg=i(Ya);cd=n(sg,"Normalizing all inputs text."),sg.forEach(t),pd=d(Qo),bt=r(Qo,"LI",{});var Bo=i(bt);hd=n(Bo,"The arguments "),Ka=r(Bo,"CODE",{});var ag=i(Ka);ud=n(ag,"special_tokens"),ag.forEach(t),md=n(Bo," and the function "),Ga=r(Bo,"CODE",{});var rg=i(Ga);fd=n(rg,"set_special_tokens"),rg.forEach(t),gd=n(Bo,`, can be used to add additional symbols (like
\u201D`),Ja=r(Bo,"STRONG",{});var ig=i(Ja);_d=n(ig,"classify"),ig.forEach(t),bd=n(Bo,"\u201D) to a vocabulary."),Bo.forEach(t),Td=d(Qo),Vo=r(Qo,"LI",{});var al=i(Vo);vd=n(al,"The argument "),Za=r(al,"CODE",{});var lg=i(Za);kd=n(lg,"do_lowercase"),lg.forEach(t),wd=n(al," controls lower casing (automatically set for pretrained vocabularies)."),al.forEach(t),Qo.forEach(t),yd=d(Ho),Yo=r(Ho,"P",{});var rl=i(Yo);Fd=n(rl,"This tokenizer inherits from "),Us=r(rl,"A",{href:!0});var dg=i(Us);Md=n(dg,"XLMTokenizer"),dg.forEach(t),$d=n(rl,`. Please check the superclass for usage examples and documentation
regarding arguments.`),rl.forEach(t),Ho.forEach(t),qi=d(s),Pt=r(s,"H2",{class:!0});var il=i(Pt);po=r(il,"A",{id:!0,class:!0,href:!0});var cg=i(po);er=r(cg,"SPAN",{});var pg=i(er);F(Ko.$$.fragment,pg),pg.forEach(t),cg.forEach(t),Ld=d(il),tr=r(il,"SPAN",{});var hg=i(tr);Ed=n(hg,"FlaubertModel"),hg.forEach(t),il.forEach(t),Ci=d(s),He=r(s,"DIV",{class:!0});var Tt=i(He);F(Go.$$.fragment,Tt),xd=d(Tt),or=r(Tt,"P",{});var ug=i(or);zd=n(ug,"The bare Flaubert Model transformer outputting raw hidden-states without any specific head on top."),ug.forEach(t),qd=d(Tt),Jo=r(Tt,"P",{});var ll=i(Jo);Cd=n(ll,"This model inherits from "),Vs=r(ll,"A",{href:!0});var mg=i(Vs);Pd=n(mg,"PreTrainedModel"),mg.forEach(t),jd=n(ll,`. 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.)`),ll.forEach(t),Xd=d(Tt),Zo=r(Tt,"P",{});var dl=i(Zo);Ad=n(dl,"This model is also a PyTorch "),en=r(dl,"A",{href:!0,rel:!0});var fg=i(en);Sd=n(fg,"torch.nn.Module"),fg.forEach(t),Nd=n(dl,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),dl.forEach(t),Od=d(Tt),Qe=r(Tt,"DIV",{class:!0});var vt=i(Qe);F(tn.$$.fragment,vt),Dd=d(vt),jt=r(vt,"P",{});var xa=i(jt);Id=n(xa,"The "),Ys=r(xa,"A",{href:!0});var gg=i(Ys);Wd=n(gg,"FlaubertModel"),gg.forEach(t),Hd=n(xa," forward method, overrides the "),nr=r(xa,"CODE",{});var _g=i(nr);Qd=n(_g,"__call__"),_g.forEach(t),Bd=n(xa," special method."),xa.forEach(t),Rd=d(vt),F(ho.$$.fragment,vt),Ud=d(vt),sr=r(vt,"P",{});var bg=i(sr);Vd=n(bg,"Example:"),bg.forEach(t),Yd=d(vt),F(on.$$.fragment,vt),vt.forEach(t),Tt.forEach(t),Pi=d(s),Xt=r(s,"H2",{class:!0});var cl=i(Xt);uo=r(cl,"A",{id:!0,class:!0,href:!0});var Tg=i(uo);ar=r(Tg,"SPAN",{});var vg=i(ar);F(nn.$$.fragment,vg),vg.forEach(t),Tg.forEach(t),Kd=d(cl),rr=r(cl,"SPAN",{});var kg=i(rr);Gd=n(kg,"FlaubertWithLMHeadModel"),kg.forEach(t),cl.forEach(t),ji=d(s),ze=r(s,"DIV",{class:!0});var at=i(ze);F(sn.$$.fragment,at),Jd=d(at),ir=r(at,"P",{});var wg=i(ir);Zd=n(wg,`The Flaubert Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),wg.forEach(t),ec=d(at),an=r(at,"P",{});var pl=i(an);tc=n(pl,"This model inherits from "),Ks=r(pl,"A",{href:!0});var yg=i(Ks);oc=n(yg,"PreTrainedModel"),yg.forEach(t),nc=n(pl,`. 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.)`),pl.forEach(t),sc=d(at),rn=r(at,"P",{});var hl=i(rn);ac=n(hl,"This model is also a PyTorch "),ln=r(hl,"A",{href:!0,rel:!0});var Fg=i(ln);rc=n(Fg,"torch.nn.Module"),Fg.forEach(t),ic=n(hl,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),hl.forEach(t),lc=d(at),dn=r(at,"P",{});var ul=i(dn);dc=n(ul,"This class overrides "),Gs=r(ul,"A",{href:!0});var Mg=i(Gs);cc=n(Mg,"XLMWithLMHeadModel"),Mg.forEach(t),pc=n(ul,`. Please check the superclass for the appropriate documentation
alongside usage examples.`),ul.forEach(t),hc=d(at),Be=r(at,"DIV",{class:!0});var kt=i(Be);F(cn.$$.fragment,kt),uc=d(kt),At=r(kt,"P",{});var za=i(At);mc=n(za,"The "),Js=r(za,"A",{href:!0});var $g=i(Js);fc=n($g,"XLMWithLMHeadModel"),$g.forEach(t),gc=n(za," forward method, overrides the "),lr=r(za,"CODE",{});var Lg=i(lr);_c=n(Lg,"__call__"),Lg.forEach(t),bc=n(za," special method."),za.forEach(t),Tc=d(kt),F(mo.$$.fragment,kt),vc=d(kt),dr=r(kt,"P",{});var Eg=i(dr);kc=n(Eg,"Example:"),Eg.forEach(t),wc=d(kt),F(pn.$$.fragment,kt),kt.forEach(t),at.forEach(t),Xi=d(s),St=r(s,"H2",{class:!0});var ml=i(St);fo=r(ml,"A",{id:!0,class:!0,href:!0});var xg=i(fo);cr=r(xg,"SPAN",{});var zg=i(cr);F(hn.$$.fragment,zg),zg.forEach(t),xg.forEach(t),yc=d(ml),pr=r(ml,"SPAN",{});var qg=i(pr);Fc=n(qg,"FlaubertForSequenceClassification"),qg.forEach(t),ml.forEach(t),Ai=d(s),qe=r(s,"DIV",{class:!0});var rt=i(qe);F(un.$$.fragment,rt),Mc=d(rt),hr=r(rt,"P",{});var Cg=i(hr);$c=n(Cg,`Flaubert Model with a sequence classification/regression head on top (a linear layer on top of the pooled output)
e.g. for GLUE tasks.`),Cg.forEach(t),Lc=d(rt),mn=r(rt,"P",{});var fl=i(mn);Ec=n(fl,"This model inherits from "),Zs=r(fl,"A",{href:!0});var Pg=i(Zs);xc=n(Pg,"PreTrainedModel"),Pg.forEach(t),zc=n(fl,`. 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.)`),fl.forEach(t),qc=d(rt),fn=r(rt,"P",{});var gl=i(fn);Cc=n(gl,"This model is also a PyTorch "),gn=r(gl,"A",{href:!0,rel:!0});var jg=i(gn);Pc=n(jg,"torch.nn.Module"),jg.forEach(t),jc=n(gl,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),gl.forEach(t),Xc=d(rt),_n=r(rt,"P",{});var _l=i(_n);Ac=n(_l,"This class overrides "),ea=r(_l,"A",{href:!0});var Xg=i(ea);Sc=n(Xg,"XLMForSequenceClassification"),Xg.forEach(t),Nc=n(_l,`. Please check the superclass for the appropriate
documentation alongside usage examples.`),_l.forEach(t),Oc=d(rt),xe=r(rt,"DIV",{class:!0});var ot=i(xe);F(bn.$$.fragment,ot),Dc=d(ot),Nt=r(ot,"P",{});var qa=i(Nt);Ic=n(qa,"The "),ta=r(qa,"A",{href:!0});var Ag=i(ta);Wc=n(Ag,"XLMForSequenceClassification"),Ag.forEach(t),Hc=n(qa," forward method, overrides the "),ur=r(qa,"CODE",{});var Sg=i(ur);Qc=n(Sg,"__call__"),Sg.forEach(t),Bc=n(qa," special method."),qa.forEach(t),Rc=d(ot),F(go.$$.fragment,ot),Uc=d(ot),mr=r(ot,"P",{});var Ng=i(mr);Vc=n(Ng,"Example of single-label classification:"),Ng.forEach(t),Yc=d(ot),F(Tn.$$.fragment,ot),Kc=d(ot),fr=r(ot,"P",{});var Og=i(fr);Gc=n(Og,"Example of multi-label classification:"),Og.forEach(t),Jc=d(ot),F(vn.$$.fragment,ot),ot.forEach(t),rt.forEach(t),Si=d(s),Ot=r(s,"H2",{class:!0});var bl=i(Ot);_o=r(bl,"A",{id:!0,class:!0,href:!0});var Dg=i(_o);gr=r(Dg,"SPAN",{});var Ig=i(gr);F(kn.$$.fragment,Ig),Ig.forEach(t),Dg.forEach(t),Zc=d(bl),_r=r(bl,"SPAN",{});var Wg=i(_r);ep=n(Wg,"FlaubertForMultipleChoice"),Wg.forEach(t),bl.forEach(t),Ni=d(s),Ce=r(s,"DIV",{class:!0});var it=i(Ce);F(wn.$$.fragment,it),tp=d(it),br=r(it,"P",{});var Hg=i(br);op=n(Hg,`Flaubert 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.`),Hg.forEach(t),np=d(it),yn=r(it,"P",{});var Tl=i(yn);sp=n(Tl,"This model inherits from "),oa=r(Tl,"A",{href:!0});var Qg=i(oa);ap=n(Qg,"PreTrainedModel"),Qg.forEach(t),rp=n(Tl,`. 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.)`),Tl.forEach(t),ip=d(it),Fn=r(it,"P",{});var vl=i(Fn);lp=n(vl,"This model is also a PyTorch "),Mn=r(vl,"A",{href:!0,rel:!0});var Bg=i(Mn);dp=n(Bg,"torch.nn.Module"),Bg.forEach(t),cp=n(vl,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),vl.forEach(t),pp=d(it),$n=r(it,"P",{});var kl=i($n);hp=n(kl,"This class overrides "),na=r(kl,"A",{href:!0});var Rg=i(na);up=n(Rg,"XLMForMultipleChoice"),Rg.forEach(t),mp=n(kl,`. Please check the superclass for the appropriate documentation
alongside usage examples.`),kl.forEach(t),fp=d(it),Re=r(it,"DIV",{class:!0});var wt=i(Re);F(Ln.$$.fragment,wt),gp=d(wt),Dt=r(wt,"P",{});var Ca=i(Dt);_p=n(Ca,"The "),sa=r(Ca,"A",{href:!0});var Ug=i(sa);bp=n(Ug,"XLMForMultipleChoice"),Ug.forEach(t),Tp=n(Ca," forward method, overrides the "),Tr=r(Ca,"CODE",{});var Vg=i(Tr);vp=n(Vg,"__call__"),Vg.forEach(t),kp=n(Ca," special method."),Ca.forEach(t),wp=d(wt),F(bo.$$.fragment,wt),yp=d(wt),vr=r(wt,"P",{});var Yg=i(vr);Fp=n(Yg,"Example:"),Yg.forEach(t),Mp=d(wt),F(En.$$.fragment,wt),wt.forEach(t),it.forEach(t),Oi=d(s),It=r(s,"H2",{class:!0});var wl=i(It);To=r(wl,"A",{id:!0,class:!0,href:!0});var Kg=i(To);kr=r(Kg,"SPAN",{});var Gg=i(kr);F(xn.$$.fragment,Gg),Gg.forEach(t),Kg.forEach(t),$p=d(wl),wr=r(wl,"SPAN",{});var Jg=i(wr);Lp=n(Jg,"FlaubertForTokenClassification"),Jg.forEach(t),wl.forEach(t),Di=d(s),Pe=r(s,"DIV",{class:!0});var lt=i(Pe);F(zn.$$.fragment,lt),Ep=d(lt),yr=r(lt,"P",{});var Zg=i(yr);xp=n(Zg,`Flaubert 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.`),Zg.forEach(t),zp=d(lt),qn=r(lt,"P",{});var yl=i(qn);qp=n(yl,"This model inherits from "),aa=r(yl,"A",{href:!0});var e_=i(aa);Cp=n(e_,"PreTrainedModel"),e_.forEach(t),Pp=n(yl,`. 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.)`),yl.forEach(t),jp=d(lt),Cn=r(lt,"P",{});var Fl=i(Cn);Xp=n(Fl,"This model is also a PyTorch "),Pn=r(Fl,"A",{href:!0,rel:!0});var t_=i(Pn);Ap=n(t_,"torch.nn.Module"),t_.forEach(t),Sp=n(Fl,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Fl.forEach(t),Np=d(lt),jn=r(lt,"P",{});var Ml=i(jn);Op=n(Ml,"This class overrides "),ra=r(Ml,"A",{href:!0});var o_=i(ra);Dp=n(o_,"XLMForTokenClassification"),o_.forEach(t),Ip=n(Ml,`. Please check the superclass for the appropriate documentation
alongside usage examples.`),Ml.forEach(t),Wp=d(lt),Ue=r(lt,"DIV",{class:!0});var yt=i(Ue);F(Xn.$$.fragment,yt),Hp=d(yt),Wt=r(yt,"P",{});var Pa=i(Wt);Qp=n(Pa,"The "),ia=r(Pa,"A",{href:!0});var n_=i(ia);Bp=n(n_,"XLMForTokenClassification"),n_.forEach(t),Rp=n(Pa," forward method, overrides the "),Fr=r(Pa,"CODE",{});var s_=i(Fr);Up=n(s_,"__call__"),s_.forEach(t),Vp=n(Pa," special method."),Pa.forEach(t),Yp=d(yt),F(vo.$$.fragment,yt),Kp=d(yt),Mr=r(yt,"P",{});var a_=i(Mr);Gp=n(a_,"Example:"),a_.forEach(t),Jp=d(yt),F(An.$$.fragment,yt),yt.forEach(t),lt.forEach(t),Ii=d(s),Ht=r(s,"H2",{class:!0});var $l=i(Ht);ko=r($l,"A",{id:!0,class:!0,href:!0});var r_=i(ko);$r=r(r_,"SPAN",{});var i_=i($r);F(Sn.$$.fragment,i_),i_.forEach(t),r_.forEach(t),Zp=d($l),Lr=r($l,"SPAN",{});var l_=i(Lr);eh=n(l_,"FlaubertForQuestionAnsweringSimple"),l_.forEach(t),$l.forEach(t),Wi=d(s),je=r(s,"DIV",{class:!0});var dt=i(je);F(Nn.$$.fragment,dt),th=d(dt),Qt=r(dt,"P",{});var ja=i(Qt);oh=n(ja,`Flaubert 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 `),Er=r(ja,"CODE",{});var d_=i(Er);nh=n(d_,"span start logits"),d_.forEach(t),sh=n(ja," and "),xr=r(ja,"CODE",{});var c_=i(xr);ah=n(c_,"span end logits"),c_.forEach(t),rh=n(ja,")."),ja.forEach(t),ih=d(dt),On=r(dt,"P",{});var Ll=i(On);lh=n(Ll,"This model inherits from "),la=r(Ll,"A",{href:!0});var p_=i(la);dh=n(p_,"PreTrainedModel"),p_.forEach(t),ch=n(Ll,`. 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.)`),Ll.forEach(t),ph=d(dt),Dn=r(dt,"P",{});var El=i(Dn);hh=n(El,"This model is also a PyTorch "),In=r(El,"A",{href:!0,rel:!0});var h_=i(In);uh=n(h_,"torch.nn.Module"),h_.forEach(t),mh=n(El,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),El.forEach(t),fh=d(dt),Wn=r(dt,"P",{});var xl=i(Wn);gh=n(xl,"This class overrides "),da=r(xl,"A",{href:!0});var u_=i(da);_h=n(u_,"XLMForQuestionAnsweringSimple"),u_.forEach(t),bh=n(xl,`. Please check the superclass for the appropriate
documentation alongside usage examples.`),xl.forEach(t),Th=d(dt),Ve=r(dt,"DIV",{class:!0});var Ft=i(Ve);F(Hn.$$.fragment,Ft),vh=d(Ft),Bt=r(Ft,"P",{});var Xa=i(Bt);kh=n(Xa,"The "),ca=r(Xa,"A",{href:!0});var m_=i(ca);wh=n(m_,"XLMForQuestionAnsweringSimple"),m_.forEach(t),yh=n(Xa," forward method, overrides the "),zr=r(Xa,"CODE",{});var f_=i(zr);Fh=n(f_,"__call__"),f_.forEach(t),Mh=n(Xa," special method."),Xa.forEach(t),$h=d(Ft),F(wo.$$.fragment,Ft),Lh=d(Ft),qr=r(Ft,"P",{});var g_=i(qr);Eh=n(g_,"Example:"),g_.forEach(t),xh=d(Ft),F(Qn.$$.fragment,Ft),Ft.forEach(t),dt.forEach(t),Hi=d(s),Rt=r(s,"H2",{class:!0});var zl=i(Rt);yo=r(zl,"A",{id:!0,class:!0,href:!0});var __=i(yo);Cr=r(__,"SPAN",{});var b_=i(Cr);F(Bn.$$.fragment,b_),b_.forEach(t),__.forEach(t),zh=d(zl),Pr=r(zl,"SPAN",{});var T_=i(Pr);qh=n(T_,"FlaubertForQuestionAnswering"),T_.forEach(t),zl.forEach(t),Qi=d(s),Xe=r(s,"DIV",{class:!0});var ct=i(Xe);F(Rn.$$.fragment,ct),Ch=d(ct),Ut=r(ct,"P",{});var Aa=i(Ut);Ph=n(Aa,`Flaubert Model with a beam-search span classification head on top for extractive question-answering tasks like
SQuAD (a linear layers on top of the hidden-states output to compute `),jr=r(Aa,"CODE",{});var v_=i(jr);jh=n(v_,"span start logits"),v_.forEach(t),Xh=n(Aa," and "),Xr=r(Aa,"CODE",{});var k_=i(Xr);Ah=n(k_,"span end logits"),k_.forEach(t),Sh=n(Aa,")."),Aa.forEach(t),Nh=d(ct),Un=r(ct,"P",{});var ql=i(Un);Oh=n(ql,"This model inherits from "),pa=r(ql,"A",{href:!0});var w_=i(pa);Dh=n(w_,"PreTrainedModel"),w_.forEach(t),Ih=n(ql,`. 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.)`),ql.forEach(t),Wh=d(ct),Vn=r(ct,"P",{});var Cl=i(Vn);Hh=n(Cl,"This model is also a PyTorch "),Yn=r(Cl,"A",{href:!0,rel:!0});var y_=i(Yn);Qh=n(y_,"torch.nn.Module"),y_.forEach(t),Bh=n(Cl,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Cl.forEach(t),Rh=d(ct),Kn=r(ct,"P",{});var Pl=i(Kn);Uh=n(Pl,"This class overrides "),ha=r(Pl,"A",{href:!0});var F_=i(ha);Vh=n(F_,"XLMForQuestionAnswering"),F_.forEach(t),Yh=n(Pl,`. Please check the superclass for the appropriate documentation
alongside usage examples.`),Pl.forEach(t),Kh=d(ct),Ye=r(ct,"DIV",{class:!0});var Mt=i(Ye);F(Gn.$$.fragment,Mt),Gh=d(Mt),Vt=r(Mt,"P",{});var Sa=i(Vt);Jh=n(Sa,"The "),ua=r(Sa,"A",{href:!0});var M_=i(ua);Zh=n(M_,"XLMForQuestionAnswering"),M_.forEach(t),eu=n(Sa," forward method, overrides the "),Ar=r(Sa,"CODE",{});var $_=i(Ar);tu=n($_,"__call__"),$_.forEach(t),ou=n(Sa," special method."),Sa.forEach(t),nu=d(Mt),F(Fo.$$.fragment,Mt),su=d(Mt),Sr=r(Mt,"P",{});var L_=i(Sr);au=n(L_,"Example:"),L_.forEach(t),ru=d(Mt),F(Jn.$$.fragment,Mt),Mt.forEach(t),ct.forEach(t),Bi=d(s),Yt=r(s,"H2",{class:!0});var jl=i(Yt);Mo=r(jl,"A",{id:!0,class:!0,href:!0});var E_=i(Mo);Nr=r(E_,"SPAN",{});var x_=i(Nr);F(Zn.$$.fragment,x_),x_.forEach(t),E_.forEach(t),iu=d(jl),Or=r(jl,"SPAN",{});var z_=i(Or);lu=n(z_,"TFFlaubertModel"),z_.forEach(t),jl.forEach(t),Ri=d(s),Ae=r(s,"DIV",{class:!0});var pt=i(Ae);F(es.$$.fragment,pt),du=d(pt),Dr=r(pt,"P",{});var q_=i(Dr);cu=n(q_,"The bare Flaubert Model transformer outputting raw hidden-states without any specific head on top."),q_.forEach(t),pu=d(pt),ts=r(pt,"P",{});var Xl=i(ts);hu=n(Xl,"This model inherits from "),ma=r(Xl,"A",{href:!0});var C_=i(ma);uu=n(C_,"TFPreTrainedModel"),C_.forEach(t),mu=n(Xl,`. 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.)`),Xl.forEach(t),fu=d(pt),os=r(pt,"P",{});var Al=i(os);gu=n(Al,"This model is also a "),ns=r(Al,"A",{href:!0,rel:!0});var P_=i(ns);_u=n(P_,"tf.keras.Model"),P_.forEach(t),bu=n(Al,` 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.`),Al.forEach(t),Tu=d(pt),F($o.$$.fragment,pt),vu=d(pt),Ke=r(pt,"DIV",{class:!0});var $t=i(Ke);F(ss.$$.fragment,$t),ku=d($t),Kt=r($t,"P",{});var Na=i(Kt);wu=n(Na,"The "),fa=r(Na,"A",{href:!0});var j_=i(fa);yu=n(j_,"TFFlaubertModel"),j_.forEach(t),Fu=n(Na," forward method, overrides the "),Ir=r(Na,"CODE",{});var X_=i(Ir);Mu=n(X_,"__call__"),X_.forEach(t),$u=n(Na," special method."),Na.forEach(t),Lu=d($t),F(Lo.$$.fragment,$t),Eu=d($t),Wr=r($t,"P",{});var A_=i(Wr);xu=n(A_,"Example:"),A_.forEach(t),zu=d($t),F(as.$$.fragment,$t),$t.forEach(t),pt.forEach(t),Ui=d(s),Gt=r(s,"H2",{class:!0});var Sl=i(Gt);Eo=r(Sl,"A",{id:!0,class:!0,href:!0});var S_=i(Eo);Hr=r(S_,"SPAN",{});var N_=i(Hr);F(rs.$$.fragment,N_),N_.forEach(t),S_.forEach(t),qu=d(Sl),Qr=r(Sl,"SPAN",{});var O_=i(Qr);Cu=n(O_,"TFFlaubertWithLMHeadModel"),O_.forEach(t),Sl.forEach(t),Vi=d(s),Se=r(s,"DIV",{class:!0});var ht=i(Se);F(is.$$.fragment,ht),Pu=d(ht),Br=r(ht,"P",{});var D_=i(Br);ju=n(D_,`The Flaubert Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),D_.forEach(t),Xu=d(ht),ls=r(ht,"P",{});var Nl=i(ls);Au=n(Nl,"This model inherits from "),ga=r(Nl,"A",{href:!0});var I_=i(ga);Su=n(I_,"TFPreTrainedModel"),I_.forEach(t),Nu=n(Nl,`. 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.)`),Nl.forEach(t),Ou=d(ht),ds=r(ht,"P",{});var Ol=i(ds);Du=n(Ol,"This model is also a "),cs=r(Ol,"A",{href:!0,rel:!0});var W_=i(cs);Iu=n(W_,"tf.keras.Model"),W_.forEach(t),Wu=n(Ol,` 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.`),Ol.forEach(t),Hu=d(ht),F(xo.$$.fragment,ht),Qu=d(ht),Ge=r(ht,"DIV",{class:!0});var Lt=i(Ge);F(ps.$$.fragment,Lt),Bu=d(Lt),Jt=r(Lt,"P",{});var Oa=i(Jt);Ru=n(Oa,"The "),_a=r(Oa,"A",{href:!0});var H_=i(_a);Uu=n(H_,"TFFlaubertWithLMHeadModel"),H_.forEach(t),Vu=n(Oa," forward method, overrides the "),Rr=r(Oa,"CODE",{});var Q_=i(Rr);Yu=n(Q_,"__call__"),Q_.forEach(t),Ku=n(Oa," special method."),Oa.forEach(t),Gu=d(Lt),F(zo.$$.fragment,Lt),Ju=d(Lt),Ur=r(Lt,"P",{});var B_=i(Ur);Zu=n(B_,"Example:"),B_.forEach(t),em=d(Lt),F(hs.$$.fragment,Lt),Lt.forEach(t),ht.forEach(t),Yi=d(s),Zt=r(s,"H2",{class:!0});var Dl=i(Zt);qo=r(Dl,"A",{id:!0,class:!0,href:!0});var R_=i(qo);Vr=r(R_,"SPAN",{});var U_=i(Vr);F(us.$$.fragment,U_),U_.forEach(t),R_.forEach(t),tm=d(Dl),Yr=r(Dl,"SPAN",{});var V_=i(Yr);om=n(V_,"TFFlaubertForSequenceClassification"),V_.forEach(t),Dl.forEach(t),Ki=d(s),Ne=r(s,"DIV",{class:!0});var ut=i(Ne);F(ms.$$.fragment,ut),nm=d(ut),Kr=r(ut,"P",{});var Y_=i(Kr);sm=n(Y_,`Flaubert Model with a sequence classification/regression head on top (a linear layer on top of the pooled output)
e.g. for GLUE tasks.`),Y_.forEach(t),am=d(ut),fs=r(ut,"P",{});var Il=i(fs);rm=n(Il,"This model inherits from "),ba=r(Il,"A",{href:!0});var K_=i(ba);im=n(K_,"TFPreTrainedModel"),K_.forEach(t),lm=n(Il,`. 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.)`),Il.forEach(t),dm=d(ut),gs=r(ut,"P",{});var Wl=i(gs);cm=n(Wl,"This model is also a "),_s=r(Wl,"A",{href:!0,rel:!0});var G_=i(_s);pm=n(G_,"tf.keras.Model"),G_.forEach(t),hm=n(Wl,` 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.`),Wl.forEach(t),um=d(ut),F(Co.$$.fragment,ut),mm=d(ut),Je=r(ut,"DIV",{class:!0});var Et=i(Je);F(bs.$$.fragment,Et),fm=d(Et),eo=r(Et,"P",{});var Da=i(eo);gm=n(Da,"The "),Ta=r(Da,"A",{href:!0});var J_=i(Ta);_m=n(J_,"TFXLMForSequenceClassification"),J_.forEach(t),bm=n(Da," forward method, overrides the "),Gr=r(Da,"CODE",{});var Z_=i(Gr);Tm=n(Z_,"__call__"),Z_.forEach(t),vm=n(Da," special method."),Da.forEach(t),km=d(Et),F(Po.$$.fragment,Et),wm=d(Et),Jr=r(Et,"P",{});var eb=i(Jr);ym=n(eb,"Example:"),eb.forEach(t),Fm=d(Et),F(Ts.$$.fragment,Et),Et.forEach(t),ut.forEach(t),Gi=d(s),to=r(s,"H2",{class:!0});var Hl=i(to);jo=r(Hl,"A",{id:!0,class:!0,href:!0});var tb=i(jo);Zr=r(tb,"SPAN",{});var ob=i(Zr);F(vs.$$.fragment,ob),ob.forEach(t),tb.forEach(t),Mm=d(Hl),ei=r(Hl,"SPAN",{});var nb=i(ei);$m=n(nb,"TFFlaubertForMultipleChoice"),nb.forEach(t),Hl.forEach(t),Ji=d(s),Oe=r(s,"DIV",{class:!0});var mt=i(Oe);F(ks.$$.fragment,mt),Lm=d(mt),ti=r(mt,"P",{});var sb=i(ti);Em=n(sb,`Flaubert 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.`),sb.forEach(t),xm=d(mt),ws=r(mt,"P",{});var Ql=i(ws);zm=n(Ql,"This model inherits from "),va=r(Ql,"A",{href:!0});var ab=i(va);qm=n(ab,"TFPreTrainedModel"),ab.forEach(t),Cm=n(Ql,`. 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.)`),Ql.forEach(t),Pm=d(mt),ys=r(mt,"P",{});var Bl=i(ys);jm=n(Bl,"This model is also a "),Fs=r(Bl,"A",{href:!0,rel:!0});var rb=i(Fs);Xm=n(rb,"tf.keras.Model"),rb.forEach(t),Am=n(Bl,` 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.`),Bl.forEach(t),Sm=d(mt),F(Xo.$$.fragment,mt),Nm=d(mt),Ze=r(mt,"DIV",{class:!0});var xt=i(Ze);F(Ms.$$.fragment,xt),Om=d(xt),oo=r(xt,"P",{});var Ia=i(oo);Dm=n(Ia,"The "),ka=r(Ia,"A",{href:!0});var ib=i(ka);Im=n(ib,"TFXLMForMultipleChoice"),ib.forEach(t),Wm=n(Ia," forward method, overrides the "),oi=r(Ia,"CODE",{});var lb=i(oi);Hm=n(lb,"__call__"),lb.forEach(t),Qm=n(Ia," special method."),Ia.forEach(t),Bm=d(xt),F(Ao.$$.fragment,xt),Rm=d(xt),ni=r(xt,"P",{});var db=i(ni);Um=n(db,"Example:"),db.forEach(t),Vm=d(xt),F($s.$$.fragment,xt),xt.forEach(t),mt.forEach(t),Zi=d(s),no=r(s,"H2",{class:!0});var Rl=i(no);So=r(Rl,"A",{id:!0,class:!0,href:!0});var cb=i(So);si=r(cb,"SPAN",{});var pb=i(si);F(Ls.$$.fragment,pb),pb.forEach(t),cb.forEach(t),Ym=d(Rl),ai=r(Rl,"SPAN",{});var hb=i(ai);Km=n(hb,"TFFlaubertForTokenClassification"),hb.forEach(t),Rl.forEach(t),el=d(s),De=r(s,"DIV",{class:!0});var ft=i(De);F(Es.$$.fragment,ft),Gm=d(ft),ri=r(ft,"P",{});var ub=i(ri);Jm=n(ub,`Flaubert 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.`),ub.forEach(t),Zm=d(ft),xs=r(ft,"P",{});var Ul=i(xs);ef=n(Ul,"This model inherits from "),wa=r(Ul,"A",{href:!0});var mb=i(wa);tf=n(mb,"TFPreTrainedModel"),mb.forEach(t),of=n(Ul,`. 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.)`),Ul.forEach(t),nf=d(ft),zs=r(ft,"P",{});var Vl=i(zs);sf=n(Vl,"This model is also a "),qs=r(Vl,"A",{href:!0,rel:!0});var fb=i(qs);af=n(fb,"tf.keras.Model"),fb.forEach(t),rf=n(Vl,` 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.`),Vl.forEach(t),lf=d(ft),F(No.$$.fragment,ft),df=d(ft),et=r(ft,"DIV",{class:!0});var zt=i(et);F(Cs.$$.fragment,zt),cf=d(zt),so=r(zt,"P",{});var Wa=i(so);pf=n(Wa,"The "),ya=r(Wa,"A",{href:!0});var gb=i(ya);hf=n(gb,"TFXLMForTokenClassification"),gb.forEach(t),uf=n(Wa," forward method, overrides the "),ii=r(Wa,"CODE",{});var _b=i(ii);mf=n(_b,"__call__"),_b.forEach(t),ff=n(Wa," special method."),Wa.forEach(t),gf=d(zt),F(Oo.$$.fragment,zt),_f=d(zt),li=r(zt,"P",{});var bb=i(li);bf=n(bb,"Example:"),bb.forEach(t),Tf=d(zt),F(Ps.$$.fragment,zt),zt.forEach(t),ft.forEach(t),tl=d(s),ao=r(s,"H2",{class:!0});var Yl=i(ao);Do=r(Yl,"A",{id:!0,class:!0,href:!0});var Tb=i(Do);di=r(Tb,"SPAN",{});var vb=i(di);F(js.$$.fragment,vb),vb.forEach(t),Tb.forEach(t),vf=d(Yl),ci=r(Yl,"SPAN",{});var kb=i(ci);kf=n(kb,"TFFlaubertForQuestionAnsweringSimple"),kb.forEach(t),Yl.forEach(t),ol=d(s),Ie=r(s,"DIV",{class:!0});var gt=i(Ie);F(Xs.$$.fragment,gt),wf=d(gt),ro=r(gt,"P",{});var Ha=i(ro);yf=n(Ha,`Flaubert Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layer on top of the hidden-states output to compute `),pi=r(Ha,"CODE",{});var wb=i(pi);Ff=n(wb,"span start logits"),wb.forEach(t),Mf=n(Ha," and "),hi=r(Ha,"CODE",{});var yb=i(hi);$f=n(yb,"span end logits"),yb.forEach(t),Lf=n(Ha,")."),Ha.forEach(t),Ef=d(gt),As=r(gt,"P",{});var Kl=i(As);xf=n(Kl,"This model inherits from "),Fa=r(Kl,"A",{href:!0});var Fb=i(Fa);zf=n(Fb,"TFPreTrainedModel"),Fb.forEach(t),qf=n(Kl,`. 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.)`),Kl.forEach(t),Cf=d(gt),Ss=r(gt,"P",{});var Gl=i(Ss);Pf=n(Gl,"This model is also a "),Ns=r(Gl,"A",{href:!0,rel:!0});var Mb=i(Ns);jf=n(Mb,"tf.keras.Model"),Mb.forEach(t),Xf=n(Gl,` 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.`),Gl.forEach(t),Af=d(gt),F(Io.$$.fragment,gt),Sf=d(gt),tt=r(gt,"DIV",{class:!0});var qt=i(tt);F(Os.$$.fragment,qt),Nf=d(qt),io=r(qt,"P",{});var Qa=i(io);Of=n(Qa,"The "),Ma=r(Qa,"A",{href:!0});var $b=i(Ma);Df=n($b,"TFXLMForQuestionAnsweringSimple"),$b.forEach(t),If=n(Qa," forward method, overrides the "),ui=r(Qa,"CODE",{});var Lb=i(ui);Wf=n(Lb,"__call__"),Lb.forEach(t),Hf=n(Qa," special method."),Qa.forEach(t),Qf=d(qt),F(Wo.$$.fragment,qt),Bf=d(qt),mi=r(qt,"P",{});var Eb=i(mi);Rf=n(Eb,"Example:"),Eb.forEach(t),Uf=d(qt),F(Ds.$$.fragment,qt),qt.forEach(t),gt.forEach(t),this.h()},h(){h(p,"name","hf:doc:metadata"),h(p,"content",JSON.stringify(Zb)),h(g,"id","flaubert"),h(g,"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"),h(g,"href","#flaubert"),h(m,"class","relative group"),h(J,"id","overview"),h(J,"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"),h(J,"href","#overview"),h(x,"class","relative group"),h(ee,"href","https://arxiv.org/abs/1912.05372"),h(ee,"rel","nofollow"),h(N,"href","https://huggingface.co/formiel"),h(N,"rel","nofollow"),h(O,"href","https://github.com/getalp/Flaubert"),h(O,"rel","nofollow"),h(S,"id","transformers.FlaubertConfig"),h(S,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(S,"href","#transformers.FlaubertConfig"),h(G,"class","relative group"),h(D,"href","/docs/transformers/pr_15839/en/model_doc/flaubert#transformers.FlaubertModel"),h(I,"href","/docs/transformers/pr_15839/en/model_doc/flaubert#transformers.TFFlaubertModel"),h(Bs,"href","/docs/transformers/pr_15839/en/main_classes/configuration#transformers.PretrainedConfig"),h(Rs,"href","/docs/transformers/pr_15839/en/main_classes/configuration#transformers.PretrainedConfig"),h(P,"class","docstring"),h(co,"id","transformers.FlaubertTokenizer"),h(co,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(co,"href","#transformers.FlaubertTokenizer"),h(Ct,"class","relative group"),h(Us,"href","/docs/transformers/pr_15839/en/model_doc/xlm#transformers.XLMTokenizer"),h(st,"class","docstring"),h(po,"id","transformers.FlaubertModel"),h(po,"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"),h(po,"href","#transformers.FlaubertModel"),h(Pt,"class","relative group"),h(Vs,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel"),h(en,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(en,"rel","nofollow"),h(Ys,"href","/docs/transformers/pr_15839/en/model_doc/flaubert#transformers.FlaubertModel"),h(Qe,"class","docstring"),h(He,"class","docstring"),h(uo,"id","transformers.FlaubertWithLMHeadModel"),h(uo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(uo,"href","#transformers.FlaubertWithLMHeadModel"),h(Xt,"class","relative group"),h(Ks,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel"),h(ln,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(ln,"rel","nofollow"),h(Gs,"href","/docs/transformers/pr_15839/en/model_doc/xlm#transformers.XLMWithLMHeadModel"),h(Js,"href","/docs/transformers/pr_15839/en/model_doc/xlm#transformers.XLMWithLMHeadModel"),h(Be,"class","docstring"),h(ze,"class","docstring"),h(fo,"id","transformers.FlaubertForSequenceClassification"),h(fo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(fo,"href","#transformers.FlaubertForSequenceClassification"),h(St,"class","relative group"),h(Zs,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel"),h(gn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(gn,"rel","nofollow"),h(ea,"href","/docs/transformers/pr_15839/en/model_doc/xlm#transformers.XLMForSequenceClassification"),h(ta,"href","/docs/transformers/pr_15839/en/model_doc/xlm#transformers.XLMForSequenceClassification"),h(xe,"class","docstring"),h(qe,"class","docstring"),h(_o,"id","transformers.FlaubertForMultipleChoice"),h(_o,"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"),h(_o,"href","#transformers.FlaubertForMultipleChoice"),h(Ot,"class","relative group"),h(oa,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel"),h(Mn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Mn,"rel","nofollow"),h(na,"href","/docs/transformers/pr_15839/en/model_doc/xlm#transformers.XLMForMultipleChoice"),h(sa,"href","/docs/transformers/pr_15839/en/model_doc/xlm#transformers.XLMForMultipleChoice"),h(Re,"class","docstring"),h(Ce,"class","docstring"),h(To,"id","transformers.FlaubertForTokenClassification"),h(To,"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"),h(To,"href","#transformers.FlaubertForTokenClassification"),h(It,"class","relative group"),h(aa,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel"),h(Pn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Pn,"rel","nofollow"),h(ra,"href","/docs/transformers/pr_15839/en/model_doc/xlm#transformers.XLMForTokenClassification"),h(ia,"href","/docs/transformers/pr_15839/en/model_doc/xlm#transformers.XLMForTokenClassification"),h(Ue,"class","docstring"),h(Pe,"class","docstring"),h(ko,"id","transformers.FlaubertForQuestionAnsweringSimple"),h(ko,"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"),h(ko,"href","#transformers.FlaubertForQuestionAnsweringSimple"),h(Ht,"class","relative group"),h(la,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel"),h(In,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(In,"rel","nofollow"),h(da,"href","/docs/transformers/pr_15839/en/model_doc/xlm#transformers.XLMForQuestionAnsweringSimple"),h(ca,"href","/docs/transformers/pr_15839/en/model_doc/xlm#transformers.XLMForQuestionAnsweringSimple"),h(Ve,"class","docstring"),h(je,"class","docstring"),h(yo,"id","transformers.FlaubertForQuestionAnswering"),h(yo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(yo,"href","#transformers.FlaubertForQuestionAnswering"),h(Rt,"class","relative group"),h(pa,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel"),h(Yn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Yn,"rel","nofollow"),h(ha,"href","/docs/transformers/pr_15839/en/model_doc/xlm#transformers.XLMForQuestionAnswering"),h(ua,"href","/docs/transformers/pr_15839/en/model_doc/xlm#transformers.XLMForQuestionAnswering"),h(Ye,"class","docstring"),h(Xe,"class","docstring"),h(Mo,"id","transformers.TFFlaubertModel"),h(Mo,"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"),h(Mo,"href","#transformers.TFFlaubertModel"),h(Yt,"class","relative group"),h(ma,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),h(ns,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(ns,"rel","nofollow"),h(fa,"href","/docs/transformers/pr_15839/en/model_doc/flaubert#transformers.TFFlaubertModel"),h(Ke,"class","docstring"),h(Ae,"class","docstring"),h(Eo,"id","transformers.TFFlaubertWithLMHeadModel"),h(Eo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(Eo,"href","#transformers.TFFlaubertWithLMHeadModel"),h(Gt,"class","relative group"),h(ga,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),h(cs,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(cs,"rel","nofollow"),h(_a,"href","/docs/transformers/pr_15839/en/model_doc/flaubert#transformers.TFFlaubertWithLMHeadModel"),h(Ge,"class","docstring"),h(Se,"class","docstring"),h(qo,"id","transformers.TFFlaubertForSequenceClassification"),h(qo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(qo,"href","#transformers.TFFlaubertForSequenceClassification"),h(Zt,"class","relative group"),h(ba,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),h(_s,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(_s,"rel","nofollow"),h(Ta,"href","/docs/transformers/pr_15839/en/model_doc/xlm#transformers.TFXLMForSequenceClassification"),h(Je,"class","docstring"),h(Ne,"class","docstring"),h(jo,"id","transformers.TFFlaubertForMultipleChoice"),h(jo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(jo,"href","#transformers.TFFlaubertForMultipleChoice"),h(to,"class","relative group"),h(va,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),h(Fs,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(Fs,"rel","nofollow"),h(ka,"href","/docs/transformers/pr_15839/en/model_doc/xlm#transformers.TFXLMForMultipleChoice"),h(Ze,"class","docstring"),h(Oe,"class","docstring"),h(So,"id","transformers.TFFlaubertForTokenClassification"),h(So,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(So,"href","#transformers.TFFlaubertForTokenClassification"),h(no,"class","relative group"),h(wa,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),h(qs,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(qs,"rel","nofollow"),h(ya,"href","/docs/transformers/pr_15839/en/model_doc/xlm#transformers.TFXLMForTokenClassification"),h(et,"class","docstring"),h(De,"class","docstring"),h(Do,"id","transformers.TFFlaubertForQuestionAnsweringSimple"),h(Do,"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"),h(Do,"href","#transformers.TFFlaubertForQuestionAnsweringSimple"),h(ao,"class","relative group"),h(Fa,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),h(Ns,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(Ns,"rel","nofollow"),h(Ma,"href","/docs/transformers/pr_15839/en/model_doc/xlm#transformers.TFXLMForQuestionAnsweringSimple"),h(tt,"class","docstring"),h(Ie,"class","docstring")},m(s,_){e(document.head,p),u(s,v,_),u(s,m,_),e(m,g),e(g,T),M(b,T,null),e(m,f),e(m,w),e(w,le),u(s,Y,_),u(s,x,_),e(x,J),e(J,H),M(Z,H,null),e(x,de),e(x,Q),e(Q,ce),u(s,se,_),u(s,U,_),e(U,X),e(U,ee),e(ee,K),e(U,z),u(s,C,_),u(s,te,_),e(te,R),u(s,ae,_),u(s,oe,_),e(oe,B),e(B,pe),u(s,re,_),u(s,q,_),e(q,he),e(q,N),e(N,ue),e(q,me),e(q,O),e(O,fe),e(q,ge),u(s,j,_),u(s,G,_),e(G,S),e(S,ne),M(c,ne,null),e(G,k),e(G,V),e(V,we),u(s,ke,_),u(s,P,_),M(ve,P,null),e(P,ye),e(P,_e),e(_e,A),e(_e,D),e(D,Fe),e(_e,Me),e(_e,I),e(I,$e),e(_e,Le),e(P,be),e(P,Te),e(Te,Jl),e(Te,Bs),e(Bs,Zl),e(Te,ed),e(Te,Rs),e(Rs,td),e(Te,od),u(s,xi,_),u(s,Ct,_),e(Ct,co),e(co,Ba),M(Ro,Ba,null),e(Ct,nd),e(Ct,Ra),e(Ra,sd),u(s,zi,_),u(s,st,_),M(Uo,st,null),e(st,ad),e(st,Ua),e(Ua,rd),e(st,id),e(st,_t),e(_t,Va),e(Va,ld),e(_t,dd),e(_t,Ya),e(Ya,cd),e(_t,pd),e(_t,bt),e(bt,hd),e(bt,Ka),e(Ka,ud),e(bt,md),e(bt,Ga),e(Ga,fd),e(bt,gd),e(bt,Ja),e(Ja,_d),e(bt,bd),e(_t,Td),e(_t,Vo),e(Vo,vd),e(Vo,Za),e(Za,kd),e(Vo,wd),e(st,yd),e(st,Yo),e(Yo,Fd),e(Yo,Us),e(Us,Md),e(Yo,$d),u(s,qi,_),u(s,Pt,_),e(Pt,po),e(po,er),M(Ko,er,null),e(Pt,Ld),e(Pt,tr),e(tr,Ed),u(s,Ci,_),u(s,He,_),M(Go,He,null),e(He,xd),e(He,or),e(or,zd),e(He,qd),e(He,Jo),e(Jo,Cd),e(Jo,Vs),e(Vs,Pd),e(Jo,jd),e(He,Xd),e(He,Zo),e(Zo,Ad),e(Zo,en),e(en,Sd),e(Zo,Nd),e(He,Od),e(He,Qe),M(tn,Qe,null),e(Qe,Dd),e(Qe,jt),e(jt,Id),e(jt,Ys),e(Ys,Wd),e(jt,Hd),e(jt,nr),e(nr,Qd),e(jt,Bd),e(Qe,Rd),M(ho,Qe,null),e(Qe,Ud),e(Qe,sr),e(sr,Vd),e(Qe,Yd),M(on,Qe,null),u(s,Pi,_),u(s,Xt,_),e(Xt,uo),e(uo,ar),M(nn,ar,null),e(Xt,Kd),e(Xt,rr),e(rr,Gd),u(s,ji,_),u(s,ze,_),M(sn,ze,null),e(ze,Jd),e(ze,ir),e(ir,Zd),e(ze,ec),e(ze,an),e(an,tc),e(an,Ks),e(Ks,oc),e(an,nc),e(ze,sc),e(ze,rn),e(rn,ac),e(rn,ln),e(ln,rc),e(rn,ic),e(ze,lc),e(ze,dn),e(dn,dc),e(dn,Gs),e(Gs,cc),e(dn,pc),e(ze,hc),e(ze,Be),M(cn,Be,null),e(Be,uc),e(Be,At),e(At,mc),e(At,Js),e(Js,fc),e(At,gc),e(At,lr),e(lr,_c),e(At,bc),e(Be,Tc),M(mo,Be,null),e(Be,vc),e(Be,dr),e(dr,kc),e(Be,wc),M(pn,Be,null),u(s,Xi,_),u(s,St,_),e(St,fo),e(fo,cr),M(hn,cr,null),e(St,yc),e(St,pr),e(pr,Fc),u(s,Ai,_),u(s,qe,_),M(un,qe,null),e(qe,Mc),e(qe,hr),e(hr,$c),e(qe,Lc),e(qe,mn),e(mn,Ec),e(mn,Zs),e(Zs,xc),e(mn,zc),e(qe,qc),e(qe,fn),e(fn,Cc),e(fn,gn),e(gn,Pc),e(fn,jc),e(qe,Xc),e(qe,_n),e(_n,Ac),e(_n,ea),e(ea,Sc),e(_n,Nc),e(qe,Oc),e(qe,xe),M(bn,xe,null),e(xe,Dc),e(xe,Nt),e(Nt,Ic),e(Nt,ta),e(ta,Wc),e(Nt,Hc),e(Nt,ur),e(ur,Qc),e(Nt,Bc),e(xe,Rc),M(go,xe,null),e(xe,Uc),e(xe,mr),e(mr,Vc),e(xe,Yc),M(Tn,xe,null),e(xe,Kc),e(xe,fr),e(fr,Gc),e(xe,Jc),M(vn,xe,null),u(s,Si,_),u(s,Ot,_),e(Ot,_o),e(_o,gr),M(kn,gr,null),e(Ot,Zc),e(Ot,_r),e(_r,ep),u(s,Ni,_),u(s,Ce,_),M(wn,Ce,null),e(Ce,tp),e(Ce,br),e(br,op),e(Ce,np),e(Ce,yn),e(yn,sp),e(yn,oa),e(oa,ap),e(yn,rp),e(Ce,ip),e(Ce,Fn),e(Fn,lp),e(Fn,Mn),e(Mn,dp),e(Fn,cp),e(Ce,pp),e(Ce,$n),e($n,hp),e($n,na),e(na,up),e($n,mp),e(Ce,fp),e(Ce,Re),M(Ln,Re,null),e(Re,gp),e(Re,Dt),e(Dt,_p),e(Dt,sa),e(sa,bp),e(Dt,Tp),e(Dt,Tr),e(Tr,vp),e(Dt,kp),e(Re,wp),M(bo,Re,null),e(Re,yp),e(Re,vr),e(vr,Fp),e(Re,Mp),M(En,Re,null),u(s,Oi,_),u(s,It,_),e(It,To),e(To,kr),M(xn,kr,null),e(It,$p),e(It,wr),e(wr,Lp),u(s,Di,_),u(s,Pe,_),M(zn,Pe,null),e(Pe,Ep),e(Pe,yr),e(yr,xp),e(Pe,zp),e(Pe,qn),e(qn,qp),e(qn,aa),e(aa,Cp),e(qn,Pp),e(Pe,jp),e(Pe,Cn),e(Cn,Xp),e(Cn,Pn),e(Pn,Ap),e(Cn,Sp),e(Pe,Np),e(Pe,jn),e(jn,Op),e(jn,ra),e(ra,Dp),e(jn,Ip),e(Pe,Wp),e(Pe,Ue),M(Xn,Ue,null),e(Ue,Hp),e(Ue,Wt),e(Wt,Qp),e(Wt,ia),e(ia,Bp),e(Wt,Rp),e(Wt,Fr),e(Fr,Up),e(Wt,Vp),e(Ue,Yp),M(vo,Ue,null),e(Ue,Kp),e(Ue,Mr),e(Mr,Gp),e(Ue,Jp),M(An,Ue,null),u(s,Ii,_),u(s,Ht,_),e(Ht,ko),e(ko,$r),M(Sn,$r,null),e(Ht,Zp),e(Ht,Lr),e(Lr,eh),u(s,Wi,_),u(s,je,_),M(Nn,je,null),e(je,th),e(je,Qt),e(Qt,oh),e(Qt,Er),e(Er,nh),e(Qt,sh),e(Qt,xr),e(xr,ah),e(Qt,rh),e(je,ih),e(je,On),e(On,lh),e(On,la),e(la,dh),e(On,ch),e(je,ph),e(je,Dn),e(Dn,hh),e(Dn,In),e(In,uh),e(Dn,mh),e(je,fh),e(je,Wn),e(Wn,gh),e(Wn,da),e(da,_h),e(Wn,bh),e(je,Th),e(je,Ve),M(Hn,Ve,null),e(Ve,vh),e(Ve,Bt),e(Bt,kh),e(Bt,ca),e(ca,wh),e(Bt,yh),e(Bt,zr),e(zr,Fh),e(Bt,Mh),e(Ve,$h),M(wo,Ve,null),e(Ve,Lh),e(Ve,qr),e(qr,Eh),e(Ve,xh),M(Qn,Ve,null),u(s,Hi,_),u(s,Rt,_),e(Rt,yo),e(yo,Cr),M(Bn,Cr,null),e(Rt,zh),e(Rt,Pr),e(Pr,qh),u(s,Qi,_),u(s,Xe,_),M(Rn,Xe,null),e(Xe,Ch),e(Xe,Ut),e(Ut,Ph),e(Ut,jr),e(jr,jh),e(Ut,Xh),e(Ut,Xr),e(Xr,Ah),e(Ut,Sh),e(Xe,Nh),e(Xe,Un),e(Un,Oh),e(Un,pa),e(pa,Dh),e(Un,Ih),e(Xe,Wh),e(Xe,Vn),e(Vn,Hh),e(Vn,Yn),e(Yn,Qh),e(Vn,Bh),e(Xe,Rh),e(Xe,Kn),e(Kn,Uh),e(Kn,ha),e(ha,Vh),e(Kn,Yh),e(Xe,Kh),e(Xe,Ye),M(Gn,Ye,null),e(Ye,Gh),e(Ye,Vt),e(Vt,Jh),e(Vt,ua),e(ua,Zh),e(Vt,eu),e(Vt,Ar),e(Ar,tu),e(Vt,ou),e(Ye,nu),M(Fo,Ye,null),e(Ye,su),e(Ye,Sr),e(Sr,au),e(Ye,ru),M(Jn,Ye,null),u(s,Bi,_),u(s,Yt,_),e(Yt,Mo),e(Mo,Nr),M(Zn,Nr,null),e(Yt,iu),e(Yt,Or),e(Or,lu),u(s,Ri,_),u(s,Ae,_),M(es,Ae,null),e(Ae,du),e(Ae,Dr),e(Dr,cu),e(Ae,pu),e(Ae,ts),e(ts,hu),e(ts,ma),e(ma,uu),e(ts,mu),e(Ae,fu),e(Ae,os),e(os,gu),e(os,ns),e(ns,_u),e(os,bu),e(Ae,Tu),M($o,Ae,null),e(Ae,vu),e(Ae,Ke),M(ss,Ke,null),e(Ke,ku),e(Ke,Kt),e(Kt,wu),e(Kt,fa),e(fa,yu),e(Kt,Fu),e(Kt,Ir),e(Ir,Mu),e(Kt,$u),e(Ke,Lu),M(Lo,Ke,null),e(Ke,Eu),e(Ke,Wr),e(Wr,xu),e(Ke,zu),M(as,Ke,null),u(s,Ui,_),u(s,Gt,_),e(Gt,Eo),e(Eo,Hr),M(rs,Hr,null),e(Gt,qu),e(Gt,Qr),e(Qr,Cu),u(s,Vi,_),u(s,Se,_),M(is,Se,null),e(Se,Pu),e(Se,Br),e(Br,ju),e(Se,Xu),e(Se,ls),e(ls,Au),e(ls,ga),e(ga,Su),e(ls,Nu),e(Se,Ou),e(Se,ds),e(ds,Du),e(ds,cs),e(cs,Iu),e(ds,Wu),e(Se,Hu),M(xo,Se,null),e(Se,Qu),e(Se,Ge),M(ps,Ge,null),e(Ge,Bu),e(Ge,Jt),e(Jt,Ru),e(Jt,_a),e(_a,Uu),e(Jt,Vu),e(Jt,Rr),e(Rr,Yu),e(Jt,Ku),e(Ge,Gu),M(zo,Ge,null),e(Ge,Ju),e(Ge,Ur),e(Ur,Zu),e(Ge,em),M(hs,Ge,null),u(s,Yi,_),u(s,Zt,_),e(Zt,qo),e(qo,Vr),M(us,Vr,null),e(Zt,tm),e(Zt,Yr),e(Yr,om),u(s,Ki,_),u(s,Ne,_),M(ms,Ne,null),e(Ne,nm),e(Ne,Kr),e(Kr,sm),e(Ne,am),e(Ne,fs),e(fs,rm),e(fs,ba),e(ba,im),e(fs,lm),e(Ne,dm),e(Ne,gs),e(gs,cm),e(gs,_s),e(_s,pm),e(gs,hm),e(Ne,um),M(Co,Ne,null),e(Ne,mm),e(Ne,Je),M(bs,Je,null),e(Je,fm),e(Je,eo),e(eo,gm),e(eo,Ta),e(Ta,_m),e(eo,bm),e(eo,Gr),e(Gr,Tm),e(eo,vm),e(Je,km),M(Po,Je,null),e(Je,wm),e(Je,Jr),e(Jr,ym),e(Je,Fm),M(Ts,Je,null),u(s,Gi,_),u(s,to,_),e(to,jo),e(jo,Zr),M(vs,Zr,null),e(to,Mm),e(to,ei),e(ei,$m),u(s,Ji,_),u(s,Oe,_),M(ks,Oe,null),e(Oe,Lm),e(Oe,ti),e(ti,Em),e(Oe,xm),e(Oe,ws),e(ws,zm),e(ws,va),e(va,qm),e(ws,Cm),e(Oe,Pm),e(Oe,ys),e(ys,jm),e(ys,Fs),e(Fs,Xm),e(ys,Am),e(Oe,Sm),M(Xo,Oe,null),e(Oe,Nm),e(Oe,Ze),M(Ms,Ze,null),e(Ze,Om),e(Ze,oo),e(oo,Dm),e(oo,ka),e(ka,Im),e(oo,Wm),e(oo,oi),e(oi,Hm),e(oo,Qm),e(Ze,Bm),M(Ao,Ze,null),e(Ze,Rm),e(Ze,ni),e(ni,Um),e(Ze,Vm),M($s,Ze,null),u(s,Zi,_),u(s,no,_),e(no,So),e(So,si),M(Ls,si,null),e(no,Ym),e(no,ai),e(ai,Km),u(s,el,_),u(s,De,_),M(Es,De,null),e(De,Gm),e(De,ri),e(ri,Jm),e(De,Zm),e(De,xs),e(xs,ef),e(xs,wa),e(wa,tf),e(xs,of),e(De,nf),e(De,zs),e(zs,sf),e(zs,qs),e(qs,af),e(zs,rf),e(De,lf),M(No,De,null),e(De,df),e(De,et),M(Cs,et,null),e(et,cf),e(et,so),e(so,pf),e(so,ya),e(ya,hf),e(so,uf),e(so,ii),e(ii,mf),e(so,ff),e(et,gf),M(Oo,et,null),e(et,_f),e(et,li),e(li,bf),e(et,Tf),M(Ps,et,null),u(s,tl,_),u(s,ao,_),e(ao,Do),e(Do,di),M(js,di,null),e(ao,vf),e(ao,ci),e(ci,kf),u(s,ol,_),u(s,Ie,_),M(Xs,Ie,null),e(Ie,wf),e(Ie,ro),e(ro,yf),e(ro,pi),e(pi,Ff),e(ro,Mf),e(ro,hi),e(hi,$f),e(ro,Lf),e(Ie,Ef),e(Ie,As),e(As,xf),e(As,Fa),e(Fa,zf),e(As,qf),e(Ie,Cf),e(Ie,Ss),e(Ss,Pf),e(Ss,Ns),e(Ns,jf),e(Ss,Xf),e(Ie,Af),M(Io,Ie,null),e(Ie,Sf),e(Ie,tt),M(Os,tt,null),e(tt,Nf),e(tt,io),e(io,Of),e(io,Ma),e(Ma,Df),e(io,If),e(io,ui),e(ui,Wf),e(io,Hf),e(tt,Qf),M(Wo,tt,null),e(tt,Bf),e(tt,mi),e(mi,Rf),e(tt,Uf),M(Ds,tt,null),nl=!0},p(s,[_]){const Is={};_&2&&(Is.$$scope={dirty:_,ctx:s}),ho.$set(Is);const fi={};_&2&&(fi.$$scope={dirty:_,ctx:s}),mo.$set(fi);const gi={};_&2&&(gi.$$scope={dirty:_,ctx:s}),go.$set(gi);const _i={};_&2&&(_i.$$scope={dirty:_,ctx:s}),bo.$set(_i);const Ws={};_&2&&(Ws.$$scope={dirty:_,ctx:s}),vo.$set(Ws);const bi={};_&2&&(bi.$$scope={dirty:_,ctx:s}),wo.$set(bi);const Ti={};_&2&&(Ti.$$scope={dirty:_,ctx:s}),Fo.$set(Ti);const vi={};_&2&&(vi.$$scope={dirty:_,ctx:s}),$o.$set(vi);const Hs={};_&2&&(Hs.$$scope={dirty:_,ctx:s}),Lo.$set(Hs);const ki={};_&2&&(ki.$$scope={dirty:_,ctx:s}),xo.$set(ki);const wi={};_&2&&(wi.$$scope={dirty:_,ctx:s}),zo.$set(wi);const yi={};_&2&&(yi.$$scope={dirty:_,ctx:s}),Co.$set(yi);const Fi={};_&2&&(Fi.$$scope={dirty:_,ctx:s}),Po.$set(Fi);const lo={};_&2&&(lo.$$scope={dirty:_,ctx:s}),Xo.$set(lo);const Mi={};_&2&&(Mi.$$scope={dirty:_,ctx:s}),Ao.$set(Mi);const $i={};_&2&&($i.$$scope={dirty:_,ctx:s}),No.$set($i);const Qs={};_&2&&(Qs.$$scope={dirty:_,ctx:s}),Oo.$set(Qs);const Li={};_&2&&(Li.$$scope={dirty:_,ctx:s}),Io.$set(Li);const Ei={};_&2&&(Ei.$$scope={dirty:_,ctx:s}),Wo.$set(Ei)},i(s){nl||($(b.$$.fragment,s),$(Z.$$.fragment,s),$(c.$$.fragment,s),$(ve.$$.fragment,s),$(Ro.$$.fragment,s),$(Uo.$$.fragment,s),$(Ko.$$.fragment,s),$(Go.$$.fragment,s),$(tn.$$.fragment,s),$(ho.$$.fragment,s),$(on.$$.fragment,s),$(nn.$$.fragment,s),$(sn.$$.fragment,s),$(cn.$$.fragment,s),$(mo.$$.fragment,s),$(pn.$$.fragment,s),$(hn.$$.fragment,s),$(un.$$.fragment,s),$(bn.$$.fragment,s),$(go.$$.fragment,s),$(Tn.$$.fragment,s),$(vn.$$.fragment,s),$(kn.$$.fragment,s),$(wn.$$.fragment,s),$(Ln.$$.fragment,s),$(bo.$$.fragment,s),$(En.$$.fragment,s),$(xn.$$.fragment,s),$(zn.$$.fragment,s),$(Xn.$$.fragment,s),$(vo.$$.fragment,s),$(An.$$.fragment,s),$(Sn.$$.fragment,s),$(Nn.$$.fragment,s),$(Hn.$$.fragment,s),$(wo.$$.fragment,s),$(Qn.$$.fragment,s),$(Bn.$$.fragment,s),$(Rn.$$.fragment,s),$(Gn.$$.fragment,s),$(Fo.$$.fragment,s),$(Jn.$$.fragment,s),$(Zn.$$.fragment,s),$(es.$$.fragment,s),$($o.$$.fragment,s),$(ss.$$.fragment,s),$(Lo.$$.fragment,s),$(as.$$.fragment,s),$(rs.$$.fragment,s),$(is.$$.fragment,s),$(xo.$$.fragment,s),$(ps.$$.fragment,s),$(zo.$$.fragment,s),$(hs.$$.fragment,s),$(us.$$.fragment,s),$(ms.$$.fragment,s),$(Co.$$.fragment,s),$(bs.$$.fragment,s),$(Po.$$.fragment,s),$(Ts.$$.fragment,s),$(vs.$$.fragment,s),$(ks.$$.fragment,s),$(Xo.$$.fragment,s),$(Ms.$$.fragment,s),$(Ao.$$.fragment,s),$($s.$$.fragment,s),$(Ls.$$.fragment,s),$(Es.$$.fragment,s),$(No.$$.fragment,s),$(Cs.$$.fragment,s),$(Oo.$$.fragment,s),$(Ps.$$.fragment,s),$(js.$$.fragment,s),$(Xs.$$.fragment,s),$(Io.$$.fragment,s),$(Os.$$.fragment,s),$(Wo.$$.fragment,s),$(Ds.$$.fragment,s),nl=!0)},o(s){L(b.$$.fragment,s),L(Z.$$.fragment,s),L(c.$$.fragment,s),L(ve.$$.fragment,s),L(Ro.$$.fragment,s),L(Uo.$$.fragment,s),L(Ko.$$.fragment,s),L(Go.$$.fragment,s),L(tn.$$.fragment,s),L(ho.$$.fragment,s),L(on.$$.fragment,s),L(nn.$$.fragment,s),L(sn.$$.fragment,s),L(cn.$$.fragment,s),L(mo.$$.fragment,s),L(pn.$$.fragment,s),L(hn.$$.fragment,s),L(un.$$.fragment,s),L(bn.$$.fragment,s),L(go.$$.fragment,s),L(Tn.$$.fragment,s),L(vn.$$.fragment,s),L(kn.$$.fragment,s),L(wn.$$.fragment,s),L(Ln.$$.fragment,s),L(bo.$$.fragment,s),L(En.$$.fragment,s),L(xn.$$.fragment,s),L(zn.$$.fragment,s),L(Xn.$$.fragment,s),L(vo.$$.fragment,s),L(An.$$.fragment,s),L(Sn.$$.fragment,s),L(Nn.$$.fragment,s),L(Hn.$$.fragment,s),L(wo.$$.fragment,s),L(Qn.$$.fragment,s),L(Bn.$$.fragment,s),L(Rn.$$.fragment,s),L(Gn.$$.fragment,s),L(Fo.$$.fragment,s),L(Jn.$$.fragment,s),L(Zn.$$.fragment,s),L(es.$$.fragment,s),L($o.$$.fragment,s),L(ss.$$.fragment,s),L(Lo.$$.fragment,s),L(as.$$.fragment,s),L(rs.$$.fragment,s),L(is.$$.fragment,s),L(xo.$$.fragment,s),L(ps.$$.fragment,s),L(zo.$$.fragment,s),L(hs.$$.fragment,s),L(us.$$.fragment,s),L(ms.$$.fragment,s),L(Co.$$.fragment,s),L(bs.$$.fragment,s),L(Po.$$.fragment,s),L(Ts.$$.fragment,s),L(vs.$$.fragment,s),L(ks.$$.fragment,s),L(Xo.$$.fragment,s),L(Ms.$$.fragment,s),L(Ao.$$.fragment,s),L($s.$$.fragment,s),L(Ls.$$.fragment,s),L(Es.$$.fragment,s),L(No.$$.fragment,s),L(Cs.$$.fragment,s),L(Oo.$$.fragment,s),L(Ps.$$.fragment,s),L(js.$$.fragment,s),L(Xs.$$.fragment,s),L(Io.$$.fragment,s),L(Os.$$.fragment,s),L(Wo.$$.fragment,s),L(Ds.$$.fragment,s),nl=!1},d(s){t(p),s&&t(v),s&&t(m),E(b),s&&t(Y),s&&t(x),E(Z),s&&t(se),s&&t(U),s&&t(C),s&&t(te),s&&t(ae),s&&t(oe),s&&t(re),s&&t(q),s&&t(j),s&&t(G),E(c),s&&t(ke),s&&t(P),E(ve),s&&t(xi),s&&t(Ct),E(Ro),s&&t(zi),s&&t(st),E(Uo),s&&t(qi),s&&t(Pt),E(Ko),s&&t(Ci),s&&t(He),E(Go),E(tn),E(ho),E(on),s&&t(Pi),s&&t(Xt),E(nn),s&&t(ji),s&&t(ze),E(sn),E(cn),E(mo),E(pn),s&&t(Xi),s&&t(St),E(hn),s&&t(Ai),s&&t(qe),E(un),E(bn),E(go),E(Tn),E(vn),s&&t(Si),s&&t(Ot),E(kn),s&&t(Ni),s&&t(Ce),E(wn),E(Ln),E(bo),E(En),s&&t(Oi),s&&t(It),E(xn),s&&t(Di),s&&t(Pe),E(zn),E(Xn),E(vo),E(An),s&&t(Ii),s&&t(Ht),E(Sn),s&&t(Wi),s&&t(je),E(Nn),E(Hn),E(wo),E(Qn),s&&t(Hi),s&&t(Rt),E(Bn),s&&t(Qi),s&&t(Xe),E(Rn),E(Gn),E(Fo),E(Jn),s&&t(Bi),s&&t(Yt),E(Zn),s&&t(Ri),s&&t(Ae),E(es),E($o),E(ss),E(Lo),E(as),s&&t(Ui),s&&t(Gt),E(rs),s&&t(Vi),s&&t(Se),E(is),E(xo),E(ps),E(zo),E(hs),s&&t(Yi),s&&t(Zt),E(us),s&&t(Ki),s&&t(Ne),E(ms),E(Co),E(bs),E(Po),E(Ts),s&&t(Gi),s&&t(to),E(vs),s&&t(Ji),s&&t(Oe),E(ks),E(Xo),E(Ms),E(Ao),E($s),s&&t(Zi),s&&t(no),E(Ls),s&&t(el),s&&t(De),E(Es),E(No),E(Cs),E(Oo),E(Ps),s&&t(tl),s&&t(ao),E(js),s&&t(ol),s&&t(Ie),E(Xs),E(Io),E(Os),E(Wo),E(Ds)}}}const Zb={local:"flaubert",sections:[{local:"overview",title:"Overview"},{local:"transformers.FlaubertConfig",title:"FlaubertConfig"},{local:"transformers.FlaubertTokenizer",title:"FlaubertTokenizer"},{local:"transformers.FlaubertModel",title:"FlaubertModel"},{local:"transformers.FlaubertWithLMHeadModel",title:"FlaubertWithLMHeadModel"},{local:"transformers.FlaubertForSequenceClassification",title:"FlaubertForSequenceClassification"},{local:"transformers.FlaubertForMultipleChoice",title:"FlaubertForMultipleChoice"},{local:"transformers.FlaubertForTokenClassification",title:"FlaubertForTokenClassification"},{local:"transformers.FlaubertForQuestionAnsweringSimple",title:"FlaubertForQuestionAnsweringSimple"},{local:"transformers.FlaubertForQuestionAnswering",title:"FlaubertForQuestionAnswering"},{local:"transformers.TFFlaubertModel",title:"TFFlaubertModel"},{local:"transformers.TFFlaubertWithLMHeadModel",title:"TFFlaubertWithLMHeadModel"},{local:"transformers.TFFlaubertForSequenceClassification",title:"TFFlaubertForSequenceClassification"},{local:"transformers.TFFlaubertForMultipleChoice",title:"TFFlaubertForMultipleChoice"},{local:"transformers.TFFlaubertForTokenClassification",title:"TFFlaubertForTokenClassification"},{local:"transformers.TFFlaubertForQuestionAnsweringSimple",title:"TFFlaubertForQuestionAnsweringSimple"}],title:"FlauBERT"};function eT(W,p,v){let{fw:m}=p;return W.$$set=g=>{"fw"in g&&v(0,m=g.fw)},[m]}class iT extends xb{constructor(p){super();zb(this,p,eT,Jb,qb,{fw:0})}}export{iT as default,Zb as metadata};
