import{S as j_,i as x_,s as L_,e as n,k as l,w as M,t as a,M as A_,c as s,d as t,m as d,a as r,x as b,h as i,b as h,F as e,g as m,y as w,q as P,o as N,B as $}from"../../chunks/vendor-4833417e.js";import{T as Ne}from"../../chunks/Tip-fffd6df1.js";import{D as J}from"../../chunks/Docstring-4f315ed9.js";import{C as Ye}from"../../chunks/CodeBlock-6a3d1b46.js";import{I as je}from"../../chunks/IconCopyLink-4b81c553.js";import"../../chunks/CopyButton-dacfbfaf.js";function I_(Q){let p,y,f,g,v;return{c(){p=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),g=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){p=s(k,"P",{});var _=r(p);y=i(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(_,"CODE",{});var F=r(f);g=i(F,"Module"),F.forEach(t),v=i(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,p,_),e(p,y),e(p,f),e(f,g),e(p,v)},d(k){k&&t(p)}}}function D_(Q){let p,y,f,g,v;return{c(){p=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),g=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){p=s(k,"P",{});var _=r(p);y=i(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(_,"CODE",{});var F=r(f);g=i(F,"Module"),F.forEach(t),v=i(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,p,_),e(p,y),e(p,f),e(f,g),e(p,v)},d(k){k&&t(p)}}}function S_(Q){let p,y,f,g,v;return{c(){p=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),g=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){p=s(k,"P",{});var _=r(p);y=i(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(_,"CODE",{});var F=r(f);g=i(F,"Module"),F.forEach(t),v=i(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,p,_),e(p,y),e(p,f),e(f,g),e(p,v)},d(k){k&&t(p)}}}function O_(Q){let p,y,f,g,v;return{c(){p=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),g=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){p=s(k,"P",{});var _=r(p);y=i(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(_,"CODE",{});var F=r(f);g=i(F,"Module"),F.forEach(t),v=i(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,p,_),e(p,y),e(p,f),e(f,g),e(p,v)},d(k){k&&t(p)}}}function W_(Q){let p,y,f,g,v;return{c(){p=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),g=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){p=s(k,"P",{});var _=r(p);y=i(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(_,"CODE",{});var F=r(f);g=i(F,"Module"),F.forEach(t),v=i(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,p,_),e(p,y),e(p,f),e(f,g),e(p,v)},d(k){k&&t(p)}}}function Q_(Q){let p,y,f,g,v;return{c(){p=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),g=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){p=s(k,"P",{});var _=r(p);y=i(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(_,"CODE",{});var F=r(f);g=i(F,"Module"),F.forEach(t),v=i(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,p,_),e(p,y),e(p,f),e(f,g),e(p,v)},d(k){k&&t(p)}}}function B_(Q){let p,y,f,g,v,k,_,F,le,U,z,X,S,G,de,O,ce,se,R,A,Y,V,E,q,Z,B,re,ee,H,ae,te,C,pe,W,oe,he,x,ne,j,me;return{c(){p=n("p"),y=a("TF 2.0 models accepts two formats as inputs:"),f=l(),g=n("ul"),v=n("li"),k=a("having all inputs as keyword arguments (like PyTorch models), or"),_=l(),F=n("li"),le=a("having all inputs as a list, tuple or dict in the first positional arguments."),U=l(),z=n("p"),X=a("This second option is useful when using "),S=n("code"),G=a("tf.keras.Model.fit"),de=a(` method which currently requires having all the
tensors in the first argument of the model call function: `),O=n("code"),ce=a("model(inputs)"),se=a("."),R=l(),A=n("p"),Y=a(`If you choose this second option, there are three possibilities you can use to gather all the input Tensor in the
first positional argument :`),V=l(),E=n("ul"),q=n("li"),Z=a("a single Tensor with "),B=n("code"),re=a("input_ids"),ee=a(" only and nothing else: "),H=n("code"),ae=a("model(inputs_ids)"),te=l(),C=n("li"),pe=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=n("code"),oe=a("model([input_ids, attention_mask])"),he=l(),x=n("li"),ne=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),j=n("code"),me=a('model({"input_ids": input_ids, "attention_mask": attention_mask})')},l(c){p=s(c,"P",{});var T=r(p);y=i(T,"TF 2.0 models accepts two formats as inputs:"),T.forEach(t),f=d(c),g=s(c,"UL",{});var K=r(g);v=s(K,"LI",{});var _e=r(v);k=i(_e,"having all inputs as keyword arguments (like PyTorch models), or"),_e.forEach(t),_=d(K),F=s(K,"LI",{});var ve=r(F);le=i(ve,"having all inputs as a list, tuple or dict in the first positional arguments."),ve.forEach(t),K.forEach(t),U=d(c),z=s(c,"P",{});var I=r(z);X=i(I,"This second option is useful when using "),S=s(I,"CODE",{});var ke=r(S);G=i(ke,"tf.keras.Model.fit"),ke.forEach(t),de=i(I,` method which currently requires having all the
tensors in the first argument of the model call function: `),O=s(I,"CODE",{});var Te=r(O);ce=i(Te,"model(inputs)"),Te.forEach(t),se=i(I,"."),I.forEach(t),R=d(c),A=s(c,"P",{});var Me=r(A);Y=i(Me,`If you choose this second option, there are three possibilities you can use to gather all the input Tensor in the
first positional argument :`),Me.forEach(t),V=d(c),E=s(c,"UL",{});var L=r(E);q=s(L,"LI",{});var D=r(q);Z=i(D,"a single Tensor with "),B=s(D,"CODE",{});var be=r(B);re=i(be,"input_ids"),be.forEach(t),ee=i(D," only and nothing else: "),H=s(D,"CODE",{});var ge=r(H);ae=i(ge,"model(inputs_ids)"),ge.forEach(t),D.forEach(t),te=d(L),C=s(L,"LI",{});var ue=r(C);pe=i(ue,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=s(ue,"CODE",{});var we=r(W);oe=i(we,"model([input_ids, attention_mask])"),we.forEach(t),ue.forEach(t),he=d(L),x=s(L,"LI",{});var ie=r(x);ne=i(ie,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),j=s(ie,"CODE",{});var fe=r(j);me=i(fe,'model({"input_ids": input_ids, "attention_mask": attention_mask})'),fe.forEach(t),ie.forEach(t),L.forEach(t)},m(c,T){m(c,p,T),e(p,y),m(c,f,T),m(c,g,T),e(g,v),e(v,k),e(g,_),e(g,F),e(F,le),m(c,U,T),m(c,z,T),e(z,X),e(z,S),e(S,G),e(z,de),e(z,O),e(O,ce),e(z,se),m(c,R,T),m(c,A,T),e(A,Y),m(c,V,T),m(c,E,T),e(E,q),e(q,Z),e(q,B),e(B,re),e(q,ee),e(q,H),e(H,ae),e(E,te),e(E,C),e(C,pe),e(C,W),e(W,oe),e(E,he),e(E,x),e(x,ne),e(x,j),e(j,me)},d(c){c&&t(p),c&&t(f),c&&t(g),c&&t(U),c&&t(z),c&&t(R),c&&t(A),c&&t(V),c&&t(E)}}}function H_(Q){let p,y,f,g,v;return{c(){p=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),g=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){p=s(k,"P",{});var _=r(p);y=i(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(_,"CODE",{});var F=r(f);g=i(F,"Module"),F.forEach(t),v=i(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,p,_),e(p,y),e(p,f),e(f,g),e(p,v)},d(k){k&&t(p)}}}function R_(Q){let p,y,f,g,v,k,_,F,le,U,z,X,S,G,de,O,ce,se,R,A,Y,V,E,q,Z,B,re,ee,H,ae,te,C,pe,W,oe,he,x,ne,j,me;return{c(){p=n("p"),y=a("TF 2.0 models accepts two formats as inputs:"),f=l(),g=n("ul"),v=n("li"),k=a("having all inputs as keyword arguments (like PyTorch models), or"),_=l(),F=n("li"),le=a("having all inputs as a list, tuple or dict in the first positional arguments."),U=l(),z=n("p"),X=a("This second option is useful when using "),S=n("code"),G=a("tf.keras.Model.fit"),de=a(` method which currently requires having all the
tensors in the first argument of the model call function: `),O=n("code"),ce=a("model(inputs)"),se=a("."),R=l(),A=n("p"),Y=a(`If you choose this second option, there are three possibilities you can use to gather all the input Tensor in the
first positional argument :`),V=l(),E=n("ul"),q=n("li"),Z=a("a single Tensor with "),B=n("code"),re=a("input_ids"),ee=a(" only and nothing else: "),H=n("code"),ae=a("model(inputs_ids)"),te=l(),C=n("li"),pe=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=n("code"),oe=a("model([input_ids, attention_mask])"),he=l(),x=n("li"),ne=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),j=n("code"),me=a('model({"input_ids": input_ids, "attention_mask": attention_mask})')},l(c){p=s(c,"P",{});var T=r(p);y=i(T,"TF 2.0 models accepts two formats as inputs:"),T.forEach(t),f=d(c),g=s(c,"UL",{});var K=r(g);v=s(K,"LI",{});var _e=r(v);k=i(_e,"having all inputs as keyword arguments (like PyTorch models), or"),_e.forEach(t),_=d(K),F=s(K,"LI",{});var ve=r(F);le=i(ve,"having all inputs as a list, tuple or dict in the first positional arguments."),ve.forEach(t),K.forEach(t),U=d(c),z=s(c,"P",{});var I=r(z);X=i(I,"This second option is useful when using "),S=s(I,"CODE",{});var ke=r(S);G=i(ke,"tf.keras.Model.fit"),ke.forEach(t),de=i(I,` method which currently requires having all the
tensors in the first argument of the model call function: `),O=s(I,"CODE",{});var Te=r(O);ce=i(Te,"model(inputs)"),Te.forEach(t),se=i(I,"."),I.forEach(t),R=d(c),A=s(c,"P",{});var Me=r(A);Y=i(Me,`If you choose this second option, there are three possibilities you can use to gather all the input Tensor in the
first positional argument :`),Me.forEach(t),V=d(c),E=s(c,"UL",{});var L=r(E);q=s(L,"LI",{});var D=r(q);Z=i(D,"a single Tensor with "),B=s(D,"CODE",{});var be=r(B);re=i(be,"input_ids"),be.forEach(t),ee=i(D," only and nothing else: "),H=s(D,"CODE",{});var ge=r(H);ae=i(ge,"model(inputs_ids)"),ge.forEach(t),D.forEach(t),te=d(L),C=s(L,"LI",{});var ue=r(C);pe=i(ue,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=s(ue,"CODE",{});var we=r(W);oe=i(we,"model([input_ids, attention_mask])"),we.forEach(t),ue.forEach(t),he=d(L),x=s(L,"LI",{});var ie=r(x);ne=i(ie,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),j=s(ie,"CODE",{});var fe=r(j);me=i(fe,'model({"input_ids": input_ids, "attention_mask": attention_mask})'),fe.forEach(t),ie.forEach(t),L.forEach(t)},m(c,T){m(c,p,T),e(p,y),m(c,f,T),m(c,g,T),e(g,v),e(v,k),e(g,_),e(g,F),e(F,le),m(c,U,T),m(c,z,T),e(z,X),e(z,S),e(S,G),e(z,de),e(z,O),e(O,ce),e(z,se),m(c,R,T),m(c,A,T),e(A,Y),m(c,V,T),m(c,E,T),e(E,q),e(q,Z),e(q,B),e(B,re),e(q,ee),e(q,H),e(H,ae),e(E,te),e(E,C),e(C,pe),e(C,W),e(W,oe),e(E,he),e(E,x),e(x,ne),e(x,j),e(j,me)},d(c){c&&t(p),c&&t(f),c&&t(g),c&&t(U),c&&t(z),c&&t(R),c&&t(A),c&&t(V),c&&t(E)}}}function U_(Q){let p,y,f,g,v;return{c(){p=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),g=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){p=s(k,"P",{});var _=r(p);y=i(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(_,"CODE",{});var F=r(f);g=i(F,"Module"),F.forEach(t),v=i(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,p,_),e(p,y),e(p,f),e(f,g),e(p,v)},d(k){k&&t(p)}}}function V_(Q){let p,y,f,g,v,k,_,F,le,U,z,X,S,G,de,O,ce,se,R,A,Y,V,E,q,Z,B,re,ee,H,ae,te,C,pe,W,oe,he,x,ne,j,me;return{c(){p=n("p"),y=a("TF 2.0 models accepts two formats as inputs:"),f=l(),g=n("ul"),v=n("li"),k=a("having all inputs as keyword arguments (like PyTorch models), or"),_=l(),F=n("li"),le=a("having all inputs as a list, tuple or dict in the first positional arguments."),U=l(),z=n("p"),X=a("This second option is useful when using "),S=n("code"),G=a("tf.keras.Model.fit"),de=a(` method which currently requires having all the
tensors in the first argument of the model call function: `),O=n("code"),ce=a("model(inputs)"),se=a("."),R=l(),A=n("p"),Y=a(`If you choose this second option, there are three possibilities you can use to gather all the input Tensor in the
first positional argument :`),V=l(),E=n("ul"),q=n("li"),Z=a("a single Tensor with "),B=n("code"),re=a("input_ids"),ee=a(" only and nothing else: "),H=n("code"),ae=a("model(inputs_ids)"),te=l(),C=n("li"),pe=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=n("code"),oe=a("model([input_ids, attention_mask])"),he=l(),x=n("li"),ne=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),j=n("code"),me=a('model({"input_ids": input_ids, "attention_mask": attention_mask})')},l(c){p=s(c,"P",{});var T=r(p);y=i(T,"TF 2.0 models accepts two formats as inputs:"),T.forEach(t),f=d(c),g=s(c,"UL",{});var K=r(g);v=s(K,"LI",{});var _e=r(v);k=i(_e,"having all inputs as keyword arguments (like PyTorch models), or"),_e.forEach(t),_=d(K),F=s(K,"LI",{});var ve=r(F);le=i(ve,"having all inputs as a list, tuple or dict in the first positional arguments."),ve.forEach(t),K.forEach(t),U=d(c),z=s(c,"P",{});var I=r(z);X=i(I,"This second option is useful when using "),S=s(I,"CODE",{});var ke=r(S);G=i(ke,"tf.keras.Model.fit"),ke.forEach(t),de=i(I,` method which currently requires having all the
tensors in the first argument of the model call function: `),O=s(I,"CODE",{});var Te=r(O);ce=i(Te,"model(inputs)"),Te.forEach(t),se=i(I,"."),I.forEach(t),R=d(c),A=s(c,"P",{});var Me=r(A);Y=i(Me,`If you choose this second option, there are three possibilities you can use to gather all the input Tensor in the
first positional argument :`),Me.forEach(t),V=d(c),E=s(c,"UL",{});var L=r(E);q=s(L,"LI",{});var D=r(q);Z=i(D,"a single Tensor with "),B=s(D,"CODE",{});var be=r(B);re=i(be,"input_ids"),be.forEach(t),ee=i(D," only and nothing else: "),H=s(D,"CODE",{});var ge=r(H);ae=i(ge,"model(inputs_ids)"),ge.forEach(t),D.forEach(t),te=d(L),C=s(L,"LI",{});var ue=r(C);pe=i(ue,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=s(ue,"CODE",{});var we=r(W);oe=i(we,"model([input_ids, attention_mask])"),we.forEach(t),ue.forEach(t),he=d(L),x=s(L,"LI",{});var ie=r(x);ne=i(ie,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),j=s(ie,"CODE",{});var fe=r(j);me=i(fe,'model({"input_ids": input_ids, "attention_mask": attention_mask})'),fe.forEach(t),ie.forEach(t),L.forEach(t)},m(c,T){m(c,p,T),e(p,y),m(c,f,T),m(c,g,T),e(g,v),e(v,k),e(g,_),e(g,F),e(F,le),m(c,U,T),m(c,z,T),e(z,X),e(z,S),e(S,G),e(z,de),e(z,O),e(O,ce),e(z,se),m(c,R,T),m(c,A,T),e(A,Y),m(c,V,T),m(c,E,T),e(E,q),e(q,Z),e(q,B),e(B,re),e(q,ee),e(q,H),e(H,ae),e(E,te),e(E,C),e(C,pe),e(C,W),e(W,oe),e(E,he),e(E,x),e(x,ne),e(x,j),e(j,me)},d(c){c&&t(p),c&&t(f),c&&t(g),c&&t(U),c&&t(z),c&&t(R),c&&t(A),c&&t(V),c&&t(E)}}}function K_(Q){let p,y,f,g,v;return{c(){p=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),g=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){p=s(k,"P",{});var _=r(p);y=i(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(_,"CODE",{});var F=r(f);g=i(F,"Module"),F.forEach(t),v=i(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,p,_),e(p,y),e(p,f),e(f,g),e(p,v)},d(k){k&&t(p)}}}function X_(Q){let p,y,f,g,v,k,_,F,le,U,z,X,S,G,de,O,ce,se,R,A,Y,V,E,q,Z,B,re,ee,H,ae,te,C,pe,W,oe,he,x,ne,j,me;return{c(){p=n("p"),y=a("TF 2.0 models accepts two formats as inputs:"),f=l(),g=n("ul"),v=n("li"),k=a("having all inputs as keyword arguments (like PyTorch models), or"),_=l(),F=n("li"),le=a("having all inputs as a list, tuple or dict in the first positional arguments."),U=l(),z=n("p"),X=a("This second option is useful when using "),S=n("code"),G=a("tf.keras.Model.fit"),de=a(` method which currently requires having all the
tensors in the first argument of the model call function: `),O=n("code"),ce=a("model(inputs)"),se=a("."),R=l(),A=n("p"),Y=a(`If you choose this second option, there are three possibilities you can use to gather all the input Tensor in the
first positional argument :`),V=l(),E=n("ul"),q=n("li"),Z=a("a single Tensor with "),B=n("code"),re=a("input_ids"),ee=a(" only and nothing else: "),H=n("code"),ae=a("model(inputs_ids)"),te=l(),C=n("li"),pe=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=n("code"),oe=a("model([input_ids, attention_mask])"),he=l(),x=n("li"),ne=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),j=n("code"),me=a('model({"input_ids": input_ids, "attention_mask": attention_mask})')},l(c){p=s(c,"P",{});var T=r(p);y=i(T,"TF 2.0 models accepts two formats as inputs:"),T.forEach(t),f=d(c),g=s(c,"UL",{});var K=r(g);v=s(K,"LI",{});var _e=r(v);k=i(_e,"having all inputs as keyword arguments (like PyTorch models), or"),_e.forEach(t),_=d(K),F=s(K,"LI",{});var ve=r(F);le=i(ve,"having all inputs as a list, tuple or dict in the first positional arguments."),ve.forEach(t),K.forEach(t),U=d(c),z=s(c,"P",{});var I=r(z);X=i(I,"This second option is useful when using "),S=s(I,"CODE",{});var ke=r(S);G=i(ke,"tf.keras.Model.fit"),ke.forEach(t),de=i(I,` method which currently requires having all the
tensors in the first argument of the model call function: `),O=s(I,"CODE",{});var Te=r(O);ce=i(Te,"model(inputs)"),Te.forEach(t),se=i(I,"."),I.forEach(t),R=d(c),A=s(c,"P",{});var Me=r(A);Y=i(Me,`If you choose this second option, there are three possibilities you can use to gather all the input Tensor in the
first positional argument :`),Me.forEach(t),V=d(c),E=s(c,"UL",{});var L=r(E);q=s(L,"LI",{});var D=r(q);Z=i(D,"a single Tensor with "),B=s(D,"CODE",{});var be=r(B);re=i(be,"input_ids"),be.forEach(t),ee=i(D," only and nothing else: "),H=s(D,"CODE",{});var ge=r(H);ae=i(ge,"model(inputs_ids)"),ge.forEach(t),D.forEach(t),te=d(L),C=s(L,"LI",{});var ue=r(C);pe=i(ue,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=s(ue,"CODE",{});var we=r(W);oe=i(we,"model([input_ids, attention_mask])"),we.forEach(t),ue.forEach(t),he=d(L),x=s(L,"LI",{});var ie=r(x);ne=i(ie,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),j=s(ie,"CODE",{});var fe=r(j);me=i(fe,'model({"input_ids": input_ids, "attention_mask": attention_mask})'),fe.forEach(t),ie.forEach(t),L.forEach(t)},m(c,T){m(c,p,T),e(p,y),m(c,f,T),m(c,g,T),e(g,v),e(v,k),e(g,_),e(g,F),e(F,le),m(c,U,T),m(c,z,T),e(z,X),e(z,S),e(S,G),e(z,de),e(z,O),e(O,ce),e(z,se),m(c,R,T),m(c,A,T),e(A,Y),m(c,V,T),m(c,E,T),e(E,q),e(q,Z),e(q,B),e(B,re),e(q,ee),e(q,H),e(H,ae),e(E,te),e(E,C),e(C,pe),e(C,W),e(W,oe),e(E,he),e(E,x),e(x,ne),e(x,j),e(j,me)},d(c){c&&t(p),c&&t(f),c&&t(g),c&&t(U),c&&t(z),c&&t(R),c&&t(A),c&&t(V),c&&t(E)}}}function J_(Q){let p,y,f,g,v;return{c(){p=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),g=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){p=s(k,"P",{});var _=r(p);y=i(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(_,"CODE",{});var F=r(f);g=i(F,"Module"),F.forEach(t),v=i(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,p,_),e(p,y),e(p,f),e(f,g),e(p,v)},d(k){k&&t(p)}}}function G_(Q){let p,y,f,g,v,k,_,F,le,U,z,X,S,G,de,O,ce,se,R,A,Y,V,E,q,Z,B,re,ee,H,ae,te,C,pe,W,oe,he,x,ne,j,me;return{c(){p=n("p"),y=a("TF 2.0 models accepts two formats as inputs:"),f=l(),g=n("ul"),v=n("li"),k=a("having all inputs as keyword arguments (like PyTorch models), or"),_=l(),F=n("li"),le=a("having all inputs as a list, tuple or dict in the first positional arguments."),U=l(),z=n("p"),X=a("This second option is useful when using "),S=n("code"),G=a("tf.keras.Model.fit"),de=a(` method which currently requires having all the
tensors in the first argument of the model call function: `),O=n("code"),ce=a("model(inputs)"),se=a("."),R=l(),A=n("p"),Y=a(`If you choose this second option, there are three possibilities you can use to gather all the input Tensor in the
first positional argument :`),V=l(),E=n("ul"),q=n("li"),Z=a("a single Tensor with "),B=n("code"),re=a("input_ids"),ee=a(" only and nothing else: "),H=n("code"),ae=a("model(inputs_ids)"),te=l(),C=n("li"),pe=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=n("code"),oe=a("model([input_ids, attention_mask])"),he=l(),x=n("li"),ne=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),j=n("code"),me=a('model({"input_ids": input_ids, "attention_mask": attention_mask})')},l(c){p=s(c,"P",{});var T=r(p);y=i(T,"TF 2.0 models accepts two formats as inputs:"),T.forEach(t),f=d(c),g=s(c,"UL",{});var K=r(g);v=s(K,"LI",{});var _e=r(v);k=i(_e,"having all inputs as keyword arguments (like PyTorch models), or"),_e.forEach(t),_=d(K),F=s(K,"LI",{});var ve=r(F);le=i(ve,"having all inputs as a list, tuple or dict in the first positional arguments."),ve.forEach(t),K.forEach(t),U=d(c),z=s(c,"P",{});var I=r(z);X=i(I,"This second option is useful when using "),S=s(I,"CODE",{});var ke=r(S);G=i(ke,"tf.keras.Model.fit"),ke.forEach(t),de=i(I,` method which currently requires having all the
tensors in the first argument of the model call function: `),O=s(I,"CODE",{});var Te=r(O);ce=i(Te,"model(inputs)"),Te.forEach(t),se=i(I,"."),I.forEach(t),R=d(c),A=s(c,"P",{});var Me=r(A);Y=i(Me,`If you choose this second option, there are three possibilities you can use to gather all the input Tensor in the
first positional argument :`),Me.forEach(t),V=d(c),E=s(c,"UL",{});var L=r(E);q=s(L,"LI",{});var D=r(q);Z=i(D,"a single Tensor with "),B=s(D,"CODE",{});var be=r(B);re=i(be,"input_ids"),be.forEach(t),ee=i(D," only and nothing else: "),H=s(D,"CODE",{});var ge=r(H);ae=i(ge,"model(inputs_ids)"),ge.forEach(t),D.forEach(t),te=d(L),C=s(L,"LI",{});var ue=r(C);pe=i(ue,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=s(ue,"CODE",{});var we=r(W);oe=i(we,"model([input_ids, attention_mask])"),we.forEach(t),ue.forEach(t),he=d(L),x=s(L,"LI",{});var ie=r(x);ne=i(ie,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),j=s(ie,"CODE",{});var fe=r(j);me=i(fe,'model({"input_ids": input_ids, "attention_mask": attention_mask})'),fe.forEach(t),ie.forEach(t),L.forEach(t)},m(c,T){m(c,p,T),e(p,y),m(c,f,T),m(c,g,T),e(g,v),e(v,k),e(g,_),e(g,F),e(F,le),m(c,U,T),m(c,z,T),e(z,X),e(z,S),e(S,G),e(z,de),e(z,O),e(O,ce),e(z,se),m(c,R,T),m(c,A,T),e(A,Y),m(c,V,T),m(c,E,T),e(E,q),e(q,Z),e(q,B),e(B,re),e(q,ee),e(q,H),e(H,ae),e(E,te),e(E,C),e(C,pe),e(C,W),e(W,oe),e(E,he),e(E,x),e(x,ne),e(x,j),e(j,me)},d(c){c&&t(p),c&&t(f),c&&t(g),c&&t(U),c&&t(z),c&&t(R),c&&t(A),c&&t(V),c&&t(E)}}}function Y_(Q){let p,y,f,g,v;return{c(){p=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),g=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){p=s(k,"P",{});var _=r(p);y=i(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(_,"CODE",{});var F=r(f);g=i(F,"Module"),F.forEach(t),v=i(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,p,_),e(p,y),e(p,f),e(f,g),e(p,v)},d(k){k&&t(p)}}}function Z_(Q){let p,y,f,g,v,k,_,F,le,U,z,X,S,G,de,O,ce,se,R,A,Y,V,E,q,Z,B,re,ee,H,ae,te,C,pe,W,oe,he,x,ne,j,me;return{c(){p=n("p"),y=a("TF 2.0 models accepts two formats as inputs:"),f=l(),g=n("ul"),v=n("li"),k=a("having all inputs as keyword arguments (like PyTorch models), or"),_=l(),F=n("li"),le=a("having all inputs as a list, tuple or dict in the first positional arguments."),U=l(),z=n("p"),X=a("This second option is useful when using "),S=n("code"),G=a("tf.keras.Model.fit"),de=a(` method which currently requires having all the
tensors in the first argument of the model call function: `),O=n("code"),ce=a("model(inputs)"),se=a("."),R=l(),A=n("p"),Y=a(`If you choose this second option, there are three possibilities you can use to gather all the input Tensor in the
first positional argument :`),V=l(),E=n("ul"),q=n("li"),Z=a("a single Tensor with "),B=n("code"),re=a("input_ids"),ee=a(" only and nothing else: "),H=n("code"),ae=a("model(inputs_ids)"),te=l(),C=n("li"),pe=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=n("code"),oe=a("model([input_ids, attention_mask])"),he=l(),x=n("li"),ne=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),j=n("code"),me=a('model({"input_ids": input_ids, "attention_mask": attention_mask})')},l(c){p=s(c,"P",{});var T=r(p);y=i(T,"TF 2.0 models accepts two formats as inputs:"),T.forEach(t),f=d(c),g=s(c,"UL",{});var K=r(g);v=s(K,"LI",{});var _e=r(v);k=i(_e,"having all inputs as keyword arguments (like PyTorch models), or"),_e.forEach(t),_=d(K),F=s(K,"LI",{});var ve=r(F);le=i(ve,"having all inputs as a list, tuple or dict in the first positional arguments."),ve.forEach(t),K.forEach(t),U=d(c),z=s(c,"P",{});var I=r(z);X=i(I,"This second option is useful when using "),S=s(I,"CODE",{});var ke=r(S);G=i(ke,"tf.keras.Model.fit"),ke.forEach(t),de=i(I,` method which currently requires having all the
tensors in the first argument of the model call function: `),O=s(I,"CODE",{});var Te=r(O);ce=i(Te,"model(inputs)"),Te.forEach(t),se=i(I,"."),I.forEach(t),R=d(c),A=s(c,"P",{});var Me=r(A);Y=i(Me,`If you choose this second option, there are three possibilities you can use to gather all the input Tensor in the
first positional argument :`),Me.forEach(t),V=d(c),E=s(c,"UL",{});var L=r(E);q=s(L,"LI",{});var D=r(q);Z=i(D,"a single Tensor with "),B=s(D,"CODE",{});var be=r(B);re=i(be,"input_ids"),be.forEach(t),ee=i(D," only and nothing else: "),H=s(D,"CODE",{});var ge=r(H);ae=i(ge,"model(inputs_ids)"),ge.forEach(t),D.forEach(t),te=d(L),C=s(L,"LI",{});var ue=r(C);pe=i(ue,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),W=s(ue,"CODE",{});var we=r(W);oe=i(we,"model([input_ids, attention_mask])"),we.forEach(t),ue.forEach(t),he=d(L),x=s(L,"LI",{});var ie=r(x);ne=i(ie,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),j=s(ie,"CODE",{});var fe=r(j);me=i(fe,'model({"input_ids": input_ids, "attention_mask": attention_mask})'),fe.forEach(t),ie.forEach(t),L.forEach(t)},m(c,T){m(c,p,T),e(p,y),m(c,f,T),m(c,g,T),e(g,v),e(v,k),e(g,_),e(g,F),e(F,le),m(c,U,T),m(c,z,T),e(z,X),e(z,S),e(S,G),e(z,de),e(z,O),e(O,ce),e(z,se),m(c,R,T),m(c,A,T),e(A,Y),m(c,V,T),m(c,E,T),e(E,q),e(q,Z),e(q,B),e(B,re),e(q,ee),e(q,H),e(H,ae),e(E,te),e(E,C),e(C,pe),e(C,W),e(W,oe),e(E,he),e(E,x),e(x,ne),e(x,j),e(j,me)},d(c){c&&t(p),c&&t(f),c&&t(g),c&&t(U),c&&t(z),c&&t(R),c&&t(A),c&&t(V),c&&t(E)}}}function ek(Q){let p,y,f,g,v;return{c(){p=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),g=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(k){p=s(k,"P",{});var _=r(p);y=i(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(_,"CODE",{});var F=r(f);g=i(F,"Module"),F.forEach(t),v=i(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(t)},m(k,_){m(k,p,_),e(p,y),e(p,f),e(f,g),e(p,v)},d(k){k&&t(p)}}}function tk(Q){let p,y,f,g,v,k,_,F,le,U,z,X,S,G,de,O,ce,se,R,A,Y,V,E,q,Z,B,re,ee,H,ae,te,C,pe,W,oe,he,x,ne,j,me,c,T,K,_e,ve,I,ke,Te,Me,L,D,be,ge,ue,we,ie,fe,no,jr,Qo,Sl,xr,Ol,fi,xe,Bo,Wl,it,Ql,Ss,Bl,Hl,Os,Rl,Ul,Ho,Vl,Kl,Xl,yt,Jl,Ws,Gl,Yl,Qs,Zl,ed,td,Lr,od,nd,Ro,gi,Ft,so,Ar,Uo,sd,Ir,rd,_i,$e,Vo,ad,Ko,id,Bs,ld,dd,cd,dt,Xo,pd,Dr,hd,md,Jo,Hs,ud,Sr,fd,gd,Rs,_d,Or,kd,vd,ro,Go,Td,Yo,Md,Wr,bd,wd,Pd,ao,Zo,Nd,Qr,$d,yd,Us,en,ki,zt,io,Br,tn,Fd,Hr,zd,vi,Ze,on,Ed,nn,qd,Rr,Cd,jd,xd,sn,Ld,Vs,Ad,Id,Dd,lo,rn,Sd,Ur,Od,Ti,Et,co,Vr,an,Wd,Kr,Qd,Mi,Le,ln,Bd,Xr,Hd,Rd,dn,Ud,Ks,Vd,Kd,Xd,cn,Jd,pn,Gd,Yd,Zd,Oe,hn,ec,qt,tc,Xs,oc,nc,Jr,sc,rc,ac,po,ic,Gr,lc,dc,mn,bi,Ct,ho,Yr,un,cc,Zr,pc,wi,jt,fn,hc,We,gn,mc,xt,uc,Js,fc,gc,ea,_c,kc,vc,mo,Tc,ta,Mc,bc,_n,Pi,Lt,uo,oa,kn,wc,na,Pc,Ni,Ae,vn,Nc,sa,$c,yc,Tn,Fc,Gs,zc,Ec,qc,Mn,Cc,bn,jc,xc,Lc,Pe,wn,Ac,At,Ic,Ys,Dc,Sc,ra,Oc,Wc,Qc,fo,Bc,aa,Hc,Rc,Pn,Uc,ia,Vc,Kc,Nn,$i,It,go,la,$n,Xc,da,Jc,yi,Ie,yn,Gc,ca,Yc,Zc,Fn,ep,Zs,tp,op,np,zn,sp,En,rp,ap,ip,Qe,qn,lp,Dt,dp,er,cp,pp,pa,hp,mp,up,_o,fp,ha,gp,_p,Cn,Fi,St,ko,ma,jn,kp,ua,vp,zi,De,xn,Tp,fa,Mp,bp,Ln,wp,tr,Pp,Np,$p,An,yp,In,Fp,zp,Ep,Be,Dn,qp,Ot,Cp,or,jp,xp,ga,Lp,Ap,Ip,vo,Dp,_a,Sp,Op,Sn,Ei,Wt,To,ka,On,Wp,va,Qp,qi,Se,Wn,Bp,Qt,Hp,Ta,Rp,Up,Ma,Vp,Kp,Xp,Qn,Jp,nr,Gp,Yp,Zp,Bn,eh,Hn,th,oh,nh,He,Rn,sh,Bt,rh,sr,ah,ih,ba,lh,dh,ch,Mo,ph,wa,hh,mh,Un,Ci,Ht,bo,Pa,Vn,uh,Na,fh,ji,ye,Kn,gh,$a,_h,kh,Xn,vh,rr,Th,Mh,bh,Jn,wh,Gn,Ph,Nh,$h,wo,yh,Re,Yn,Fh,Rt,zh,ar,Eh,qh,ya,Ch,jh,xh,Po,Lh,Fa,Ah,Ih,Zn,xi,Ut,No,za,es,Dh,Ea,Sh,Li,Fe,ts,Oh,os,Wh,qa,Qh,Bh,Hh,ns,Rh,ir,Uh,Vh,Kh,ss,Xh,rs,Jh,Gh,Yh,$o,Zh,Ue,as,em,Vt,tm,lr,om,nm,Ca,sm,rm,am,yo,im,ja,lm,dm,is,Ai,Kt,Fo,xa,ls,cm,La,pm,Ii,ze,ds,hm,Aa,mm,um,cs,fm,dr,gm,_m,km,ps,vm,hs,Tm,Mm,bm,zo,wm,Ve,ms,Pm,Xt,Nm,cr,$m,ym,Ia,Fm,zm,Em,Eo,qm,Da,Cm,jm,us,Di,Jt,qo,Sa,fs,xm,Oa,Lm,Si,Ee,gs,Am,Wa,Im,Dm,_s,Sm,pr,Om,Wm,Qm,ks,Bm,vs,Hm,Rm,Um,Co,Vm,Ke,Ts,Km,Gt,Xm,hr,Jm,Gm,Qa,Ym,Zm,eu,jo,tu,Ba,ou,nu,Ms,Oi,Yt,xo,Ha,bs,su,Ra,ru,Wi,qe,ws,au,Ua,iu,lu,Ps,du,mr,cu,pu,hu,Ns,mu,$s,uu,fu,gu,Lo,_u,Xe,ys,ku,Zt,vu,ur,Tu,Mu,Va,bu,wu,Pu,Ao,Nu,Ka,$u,yu,Fs,Qi,eo,Io,Xa,zs,Fu,Ja,zu,Bi,Ce,Es,Eu,to,qu,Ga,Cu,ju,Ya,xu,Lu,Au,qs,Iu,fr,Du,Su,Ou,Cs,Wu,js,Qu,Bu,Hu,Do,Ru,Je,xs,Uu,oo,Vu,gr,Ku,Xu,Za,Ju,Gu,Yu,So,Zu,ei,ef,tf,Ls,Hi;return k=new je({}),G=new je({}),Qo=new je({}),Bo=new J({props:{name:"class transformers.MPNetConfig",anchor:"transformers.MPNetConfig",parameters:[{name:"vocab_size",val:" = 30527"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"relative_attention_num_buckets",val:" = 32"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/configuration_mpnet.py#L29",parametersDescription:[{anchor:"transformers.MPNetConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30527) &#x2014;
Vocabulary size of the MPNet 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/mpnet#transformers.MPNetModel">MPNetModel</a> or <a href="/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.TFMPNetModel">TFMPNetModel</a>.`,name:"vocab_size"},{anchor:"transformers.MPNetConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.MPNetConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.MPNetConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.MPNetConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.MPNetConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.MPNetConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.MPNetConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.MPNetConfig.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.MPNetConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.MPNetConfig.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.MPNetConfig.relative_attention_num_buckets",description:`<strong>relative_attention_num_buckets</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The number of buckets to use for each attention layer.`,name:"relative_attention_num_buckets"}]}}),Ro=new Ye({props:{code:`from transformers import MPNetModel, MPNetConfig

# Initializing a MPNet mpnet-base style configuration
configuration = MPNetConfig()

# Initializing a model from the mpnet-base style configuration
model = MPNetModel(configuration)

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a MPNet mpnet-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = MPNetConfig()

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),Uo=new je({}),Vo=new J({props:{name:"class transformers.MPNetTokenizer",anchor:"transformers.MPNetTokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = True"},{name:"do_basic_tokenize",val:" = True"},{name:"never_split",val:" = None"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '[UNK]'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/tokenization_mpnet.py#L66",parametersDescription:[{anchor:"transformers.MPNetTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.MPNetTokenizer.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.MPNetTokenizer.do_basic_tokenize",description:`<strong>do_basic_tokenize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to do basic tokenization before WordPiece.`,name:"do_basic_tokenize"},{anchor:"transformers.MPNetTokenizer.never_split",description:`<strong>never_split</strong> (<code>Iterable</code>, <em>optional</em>) &#x2014;
Collection of tokens which will never be split during tokenization. Only has an effect when
<code>do_basic_tokenize=True</code>`,name:"never_split"},{anchor:"transformers.MPNetTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pre-training. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

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

					</div>`,name:"eos_token"},{anchor:"transformers.MPNetTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.MPNetTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.MPNetTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[UNK]&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.MPNetTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.MPNetTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.MPNetTokenizer.tokenize_chinese_chars",description:`<strong>tokenize_chinese_chars</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to tokenize Chinese characters.</p>
<p>This should likely be deactivated for Japanese (see this
<a href="https://github.com/huggingface/transformers/issues/328" rel="nofollow">issue</a>).
strip_accents &#x2014; (<code>bool</code>, <em>optional</em>):
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original BERT).`,name:"tokenize_chinese_chars"}]}}),Xo=new J({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.MPNetTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/tokenization_mpnet.py#L231",parametersDescription:[{anchor:"transformers.MPNetTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added`,name:"token_ids_0"},{anchor:"transformers.MPNetTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],returnDescription:`
<p>list of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Go=new J({props:{name:"get_special_tokens_mask",anchor:"transformers.MPNetTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/tokenization_mpnet.py#L256",parametersDescription:[{anchor:"transformers.MPNetTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of ids.`,name:"token_ids_0"},{anchor:"transformers.MPNetTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.MPNetTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Set to True if the token list is already formatted with special tokens for the model`,name:"already_has_special_tokens"}],returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Zo=new J({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.MPNetTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/tokenization_mpnet.py#L283",parametersDescription:[{anchor:"transformers.MPNetTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of ids.`,name:"token_ids_0"},{anchor:"transformers.MPNetTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),en=new J({props:{name:"save_vocabulary",anchor:"transformers.MPNetTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/tokenization_mpnet.py#L306"}}),tn=new je({}),on=new J({props:{name:"class transformers.MPNetTokenizerFast",anchor:"transformers.MPNetTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = True"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '[UNK]'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/tokenization_mpnet_fast.py#L51",parametersDescription:[{anchor:"transformers.MPNetTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.MPNetTokenizerFast.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.MPNetTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

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

					</div>`,name:"eos_token"},{anchor:"transformers.MPNetTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.MPNetTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.MPNetTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[UNK]&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.MPNetTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.MPNetTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.MPNetTokenizerFast.tokenize_chinese_chars",description:`<strong>tokenize_chinese_chars</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to tokenize Chinese characters. This should likely be deactivated for Japanese (see <a href="https://github.com/huggingface/transformers/issues/328" rel="nofollow">this
issue</a>).
strip_accents &#x2014; (<code>bool</code>, <em>optional</em>):
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original BERT).`,name:"tokenize_chinese_chars"}]}}),rn=new J({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.MPNetTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/tokenization_mpnet_fast.py#L190",parametersDescription:[{anchor:"transformers.MPNetTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of ids.`,name:"token_ids_0"},{anchor:"transformers.MPNetTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs`,name:"token_ids_1"}],returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),an=new je({}),ln=new J({props:{name:"class transformers.MPNetModel",anchor:"transformers.MPNetModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_mpnet.py#L482",parametersDescription:[{anchor:"transformers.MPNetModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.MPNetConfig">MPNetConfig</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 J({props:{name:"forward",anchor:"transformers.MPNetModel.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_mpnet.py#L511",parametersDescription:[{anchor:"transformers.MPNetModel.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/mpnet#transformers.MPNetTokenizer">MPNetTokenizer</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.MPNetModel.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.MPNetModel.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.MPNetModel.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.MPNetModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MPNetModel.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.MPNetModel.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.MPNetModel.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.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</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/mpnet#transformers.MPNetConfig"
>MPNetConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),po=new Ne({props:{$$slots:{default:[I_]},$$scope:{ctx:Q}}}),mn=new Ye({props:{code:`from transformers import MPNetTokenizer, MPNetModel
import torch

tokenizer = MPNetTokenizer.from_pretrained("microsoft/mpnet-base")
model = MPNetModel.from_pretrained("microsoft/mpnet-base")

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MPNetTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MPNetModel.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),un=new je({}),fn=new J({props:{name:"class transformers.MPNetForMaskedLM",anchor:"transformers.MPNetForMaskedLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_mpnet.py#L575"}}),gn=new J({props:{name:"forward",anchor:"transformers.MPNetForMaskedLM.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"labels",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_mpnet.py#L594",parametersDescription:[{anchor:"transformers.MPNetForMaskedLM.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/mpnet#transformers.MPNetTokenizer">MPNetTokenizer</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.MPNetForMaskedLM.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.MPNetForMaskedLM.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.MPNetForMaskedLM.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.MPNetForMaskedLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MPNetForMaskedLM.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.MPNetForMaskedLM.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.MPNetForMaskedLM.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.MPNetForMaskedLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.MPNetConfig"
>MPNetConfig</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 Ne({props:{$$slots:{default:[D_]},$$scope:{ctx:Q}}}),_n=new Ye({props:{code:`from transformers import MPNetTokenizer, MPNetForMaskedLM
import torch

tokenizer = MPNetTokenizer.from_pretrained("microsoft/mpnet-base")
model = MPNetForMaskedLM.from_pretrained("microsoft/mpnet-base")

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MPNetTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MPNetForMaskedLM.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),kn=new je({}),vn=new J({props:{name:"class transformers.MPNetForSequenceClassification",anchor:"transformers.MPNetForSequenceClassification",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_mpnet.py#L684",parametersDescription:[{anchor:"transformers.MPNetForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.MPNetConfig">MPNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),wn=new J({props:{name:"forward",anchor:"transformers.MPNetForSequenceClassification.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"labels",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_mpnet.py#L697",parametersDescription:[{anchor:"transformers.MPNetForSequenceClassification.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/mpnet#transformers.MPNetTokenizer">MPNetTokenizer</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.MPNetForSequenceClassification.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.MPNetForSequenceClassification.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.MPNetForSequenceClassification.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.MPNetForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MPNetForSequenceClassification.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.MPNetForSequenceClassification.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.MPNetForSequenceClassification.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.MPNetForSequenceClassification.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/mpnet#transformers.MPNetConfig"
>MPNetConfig</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>
`}}),fo=new Ne({props:{$$slots:{default:[S_]},$$scope:{ctx:Q}}}),Pn=new Ye({props:{code:`import torch
from transformers import MPNetTokenizer, MPNetForSequenceClassification

torch.manual_seed(0)
tokenizer = MPNetTokenizer.from_pretrained("microsoft/mpnet-base")
model = MPNetForSequenceClassification.from_pretrained("microsoft/mpnet-base", num_labels=2)

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
labels = torch.tensor([1]).unsqueeze(0)  # Batch size 1
outputs = model(**inputs, labels=labels)
loss = outputs.loss
logits = outputs.logits
list(logits.shape)
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MPNetTokenizer, MPNetForSequenceClassification

<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 = MPNetTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MPNetForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>, num_labels=<span class="hljs-number">2</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor([<span class="hljs-number">1</span>]).unsqueeze(<span class="hljs-number">0</span>)  <span class="hljs-comment"># Batch size 1</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(logits.shape)
`}}),Nn=new Ye({props:{code:`import torch
from transformers import MPNetTokenizer, MPNetForSequenceClassification

torch.manual_seed(0)
tokenizer = MPNetTokenizer.from_pretrained("microsoft/mpnet-base")
model = MPNetForSequenceClassification.from_pretrained("microsoft/mpnet-base", problem_type="multi_label_classification", num_labels=2)

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
labels = torch.tensor([[1, 1]], dtype=torch.float)  # need dtype=float for BCEWithLogitsLoss
outputs = model(**inputs, labels=labels)
loss = outputs.loss
list(logits.shape)
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MPNetTokenizer, MPNetForSequenceClassification

<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 = MPNetTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MPNetForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>, num_labels=<span class="hljs-number">2</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor([[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>]], dtype=torch.<span class="hljs-built_in">float</span>)  <span class="hljs-comment"># need dtype=float for BCEWithLogitsLoss</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(logits.shape)
`}}),$n=new je({}),yn=new J({props:{name:"class transformers.MPNetForMultipleChoice",anchor:"transformers.MPNetForMultipleChoice",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_mpnet.py#L779",parametersDescription:[{anchor:"transformers.MPNetForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.MPNetConfig">MPNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),qn=new J({props:{name:"forward",anchor:"transformers.MPNetForMultipleChoice.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"labels",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_mpnet.py#L792",parametersDescription:[{anchor:"transformers.MPNetForMultipleChoice.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/mpnet#transformers.MPNetTokenizer">MPNetTokenizer</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.MPNetForMultipleChoice.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.MPNetForMultipleChoice.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.MPNetForMultipleChoice.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.MPNetForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MPNetForMultipleChoice.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.MPNetForMultipleChoice.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.MPNetForMultipleChoice.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.MPNetForMultipleChoice.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/mpnet#transformers.MPNetConfig"
>MPNetConfig</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>
`}}),_o=new Ne({props:{$$slots:{default:[O_]},$$scope:{ctx:Q}}}),Cn=new Ye({props:{code:`from transformers import MPNetTokenizer, MPNetForMultipleChoice
import torch

tokenizer = MPNetTokenizer.from_pretrained("microsoft/mpnet-base")
model = MPNetForMultipleChoice.from_pretrained("microsoft/mpnet-base")

prompt = "In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced."
choice0 = "It is eaten with a fork and a knife."
choice1 = "It is eaten while held in the hand."
labels = torch.tensor(0).unsqueeze(0)  # choice0 is correct (according to Wikipedia ;)), batch size 1

encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors="pt", padding=True)
outputs = model(**{k: v.unsqueeze(0) for k, v in encoding.items()}, labels=labels)  # batch size is 1

# the linear classifier still needs to be trained
loss = outputs.loss
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MPNetTokenizer, MPNetForMultipleChoice
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MPNetTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MPNetForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice0 = <span class="hljs-string">&quot;It is eaten with a fork and a knife.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice1 = <span class="hljs-string">&quot;It is eaten while held in the hand.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor(<span class="hljs-number">0</span>).unsqueeze(<span class="hljs-number">0</span>)  <span class="hljs-comment"># choice0 is correct (according to Wikipedia ;)), batch size 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**{k: v.unsqueeze(<span class="hljs-number">0</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()}, labels=labels)  <span class="hljs-comment"># batch size is 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),jn=new je({}),xn=new J({props:{name:"class transformers.MPNetForTokenClassification",anchor:"transformers.MPNetForTokenClassification",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_mpnet.py#L870",parametersDescription:[{anchor:"transformers.MPNetForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.MPNetConfig">MPNetConfig</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"}]}}),Dn=new J({props:{name:"forward",anchor:"transformers.MPNetForTokenClassification.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"labels",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_mpnet.py#L885",parametersDescription:[{anchor:"transformers.MPNetForTokenClassification.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/mpnet#transformers.MPNetTokenizer">MPNetTokenizer</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.MPNetForTokenClassification.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.MPNetForTokenClassification.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.MPNetForTokenClassification.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.MPNetForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MPNetForTokenClassification.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.MPNetForTokenClassification.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.MPNetForTokenClassification.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.MPNetForTokenClassification.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/mpnet#transformers.MPNetConfig"
>MPNetConfig</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 Ne({props:{$$slots:{default:[W_]},$$scope:{ctx:Q}}}),Sn=new Ye({props:{code:`from transformers import MPNetTokenizer, MPNetForTokenClassification
import torch

tokenizer = MPNetTokenizer.from_pretrained("microsoft/mpnet-base")
model = MPNetForTokenClassification.from_pretrained("microsoft/mpnet-base")

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MPNetTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MPNetForTokenClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor([<span class="hljs-number">1</span>] * inputs[<span class="hljs-string">&quot;input_ids&quot;</span>].size(<span class="hljs-number">1</span>)).unsqueeze(<span class="hljs-number">0</span>)  <span class="hljs-comment"># Batch size 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),On=new je({}),Wn=new J({props:{name:"class transformers.MPNetForQuestionAnswering",anchor:"transformers.MPNetForQuestionAnswering",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_mpnet.py#L970",parametersDescription:[{anchor:"transformers.MPNetForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.MPNetConfig">MPNetConfig</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"}]}}),Rn=new J({props:{name:"forward",anchor:"transformers.MPNetForQuestionAnswering.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"start_positions",val:" = None"},{name:"end_positions",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_mpnet.py#L984",parametersDescription:[{anchor:"transformers.MPNetForQuestionAnswering.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/mpnet#transformers.MPNetTokenizer">MPNetTokenizer</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.MPNetForQuestionAnswering.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.MPNetForQuestionAnswering.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.MPNetForQuestionAnswering.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.MPNetForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MPNetForQuestionAnswering.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.MPNetForQuestionAnswering.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.MPNetForQuestionAnswering.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.MPNetForQuestionAnswering.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.MPNetForQuestionAnswering.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/mpnet#transformers.MPNetConfig"
>MPNetConfig</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>
`}}),Mo=new Ne({props:{$$slots:{default:[Q_]},$$scope:{ctx:Q}}}),Un=new Ye({props:{code:`from transformers import MPNetTokenizer, MPNetForQuestionAnswering
import torch

torch.manual_seed(0)
tokenizer = MPNetTokenizer.from_pretrained("microsoft/mpnet-base")
model = MPNetForQuestionAnswering.from_pretrained("microsoft/mpnet-base")

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

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


start_scores = outputs.start_logits
list(start_scores.shape)


end_scores = outputs.end_logits
list(end_scores.shape)
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MPNetTokenizer, MPNetForQuestionAnswering
<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 = MPNetTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MPNetForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_positions = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>end_positions = torch.tensor([<span class="hljs-number">3</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=start_positions, end_positions=end_positions)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)


<span class="hljs-meta">&gt;&gt;&gt; </span>start_scores = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(start_scores.shape)


<span class="hljs-meta">&gt;&gt;&gt; </span>end_scores = outputs.end_logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(end_scores.shape)
`}}),Vn=new je({}),Kn=new J({props:{name:"class transformers.TFMPNetModel",anchor:"transformers.TFMPNetModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_tf_mpnet.py#L678",parametersDescription:[{anchor:"transformers.TFMPNetModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.MPNetConfig">MPNetConfig</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"}]}}),wo=new Ne({props:{$$slots:{default:[B_]},$$scope:{ctx:Q}}}),Yn=new J({props:{name:"call",anchor:"transformers.TFMPNetModel.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"training",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_tf_mpnet.py#L683",parametersDescription:[{anchor:"transformers.TFMPNetModel.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/mpnet#transformers.MPNetTokenizer">MPNetTokenizer</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.TFMPNetModel.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.TFMPNetModel.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.TFMPNetModel.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.TFMPNetModel.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.TFMPNetModel.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.TFMPNetModel.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.TFMPNetModel.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.TFMPNetModel.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/mpnet#transformers.MPNetConfig"
>MPNetConfig</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>
`}}),Po=new Ne({props:{$$slots:{default:[H_]},$$scope:{ctx:Q}}}),Zn=new Ye({props:{code:`from transformers import MPNetTokenizer, TFMPNetModel
import tensorflow as tf

tokenizer = MPNetTokenizer.from_pretrained("microsoft/mpnet-base")
model = TFMPNetModel.from_pretrained("microsoft/mpnet-base")

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

last_hidden_states = outputs.last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MPNetTokenizer, TFMPNetModel
<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 = MPNetTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFMPNetModel.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),es=new je({}),ts=new J({props:{name:"class transformers.TFMPNetForMaskedLM",anchor:"transformers.TFMPNetForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_tf_mpnet.py#L795",parametersDescription:[{anchor:"transformers.TFMPNetForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.MPNetConfig">MPNetConfig</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 Ne({props:{$$slots:{default:[R_]},$$scope:{ctx:Q}}}),as=new J({props:{name:"call",anchor:"transformers.TFMPNetForMaskedLM.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"labels",val:" = None"},{name:"training",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_tf_mpnet.py#L812",parametersDescription:[{anchor:"transformers.TFMPNetForMaskedLM.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/mpnet#transformers.MPNetTokenizer">MPNetTokenizer</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.TFMPNetForMaskedLM.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.TFMPNetForMaskedLM.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.TFMPNetForMaskedLM.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.TFMPNetForMaskedLM.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.TFMPNetForMaskedLM.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.TFMPNetForMaskedLM.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.TFMPNetForMaskedLM.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.TFMPNetForMaskedLM.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.TFMPNetForMaskedLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.MPNetConfig"
>MPNetConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),yo=new Ne({props:{$$slots:{default:[U_]},$$scope:{ctx:Q}}}),is=new Ye({props:{code:`from transformers import MPNetTokenizer, TFMPNetForMaskedLM
import tensorflow as tf

tokenizer = MPNetTokenizer.from_pretrained("microsoft/mpnet-base")
model = TFMPNetForMaskedLM.from_pretrained("microsoft/mpnet-base")

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

outputs = model(inputs)
loss = outputs.loss
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MPNetTokenizer, TFMPNetForMaskedLM
<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 = MPNetTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFMPNetForMaskedLM.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),ls=new je({}),ds=new J({props:{name:"class transformers.TFMPNetForSequenceClassification",anchor:"transformers.TFMPNetForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_tf_mpnet.py#L922",parametersDescription:[{anchor:"transformers.TFMPNetForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.MPNetConfig">MPNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),zo=new Ne({props:{$$slots:{default:[V_]},$$scope:{ctx:Q}}}),ms=new J({props:{name:"call",anchor:"transformers.TFMPNetForSequenceClassification.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"labels",val:" = None"},{name:"training",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_tf_mpnet.py#L933",parametersDescription:[{anchor:"transformers.TFMPNetForSequenceClassification.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/mpnet#transformers.MPNetTokenizer">MPNetTokenizer</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.TFMPNetForSequenceClassification.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.TFMPNetForSequenceClassification.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.TFMPNetForSequenceClassification.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.TFMPNetForSequenceClassification.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.TFMPNetForSequenceClassification.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.TFMPNetForSequenceClassification.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.TFMPNetForSequenceClassification.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.TFMPNetForSequenceClassification.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.TFMPNetForSequenceClassification.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/mpnet#transformers.MPNetConfig"
>MPNetConfig</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>
`}}),Eo=new Ne({props:{$$slots:{default:[K_]},$$scope:{ctx:Q}}}),us=new Ye({props:{code:`from transformers import MPNetTokenizer, TFMPNetForSequenceClassification
import tensorflow as tf

tokenizer = MPNetTokenizer.from_pretrained("microsoft/mpnet-base")
model = TFMPNetForSequenceClassification.from_pretrained("microsoft/mpnet-base")

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

outputs = model(inputs)
loss = outputs.loss
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MPNetTokenizer, TFMPNetForSequenceClassification
<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 = MPNetTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFMPNetForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs[<span class="hljs-string">&quot;labels&quot;</span>] = tf.reshape(tf.constant(<span class="hljs-number">1</span>), (-<span class="hljs-number">1</span>, <span class="hljs-number">1</span>))  <span class="hljs-comment"># Batch size 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),fs=new je({}),gs=new J({props:{name:"class transformers.TFMPNetForMultipleChoice",anchor:"transformers.TFMPNetForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_tf_mpnet.py#L1019",parametersDescription:[{anchor:"transformers.TFMPNetForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.MPNetConfig">MPNetConfig</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 Ne({props:{$$slots:{default:[X_]},$$scope:{ctx:Q}}}),Ts=new J({props:{name:"call",anchor:"transformers.TFMPNetForMultipleChoice.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"labels",val:" = None"},{name:"training",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_tf_mpnet.py#L1039",parametersDescription:[{anchor:"transformers.TFMPNetForMultipleChoice.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/mpnet#transformers.MPNetTokenizer">MPNetTokenizer</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.TFMPNetForMultipleChoice.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.TFMPNetForMultipleChoice.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.TFMPNetForMultipleChoice.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.TFMPNetForMultipleChoice.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.TFMPNetForMultipleChoice.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.TFMPNetForMultipleChoice.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.TFMPNetForMultipleChoice.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.TFMPNetForMultipleChoice.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.TFMPNetForMultipleChoice.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices]</code>
where <code>num_choices</code> is the size of the second dimension of the input tensors. (See <code>input_ids</code> above)`,name:"labels"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.MPNetConfig"
>MPNetConfig</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>
`}}),jo=new Ne({props:{$$slots:{default:[J_]},$$scope:{ctx:Q}}}),Ms=new Ye({props:{code:`from transformers import MPNetTokenizer, TFMPNetForMultipleChoice
import tensorflow as tf

tokenizer = MPNetTokenizer.from_pretrained("microsoft/mpnet-base")
model = TFMPNetForMultipleChoice.from_pretrained("microsoft/mpnet-base")

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

encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors="tf", padding=True)
inputs = {k: tf.expand_dims(v, 0) for k, v in encoding.items()}
outputs = model(inputs)  # batch size is 1

# the linear classifier still needs to be trained
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MPNetTokenizer, TFMPNetForMultipleChoice
<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 = MPNetTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFMPNetForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;tf&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = {k: tf.expand_dims(v, <span class="hljs-number">0</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()}
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)  <span class="hljs-comment"># batch size is 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),bs=new je({}),ws=new J({props:{name:"class transformers.TFMPNetForTokenClassification",anchor:"transformers.TFMPNetForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_tf_mpnet.py#L1156",parametersDescription:[{anchor:"transformers.TFMPNetForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.MPNetConfig">MPNetConfig</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"}]}}),Lo=new Ne({props:{$$slots:{default:[G_]},$$scope:{ctx:Q}}}),ys=new J({props:{name:"call",anchor:"transformers.TFMPNetForTokenClassification.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"labels",val:" = None"},{name:"training",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_tf_mpnet.py#L1170",parametersDescription:[{anchor:"transformers.TFMPNetForTokenClassification.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/mpnet#transformers.MPNetTokenizer">MPNetTokenizer</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.TFMPNetForTokenClassification.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.TFMPNetForTokenClassification.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.TFMPNetForTokenClassification.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.TFMPNetForTokenClassification.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.TFMPNetForTokenClassification.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.TFMPNetForTokenClassification.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.TFMPNetForTokenClassification.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.TFMPNetForTokenClassification.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.TFMPNetForTokenClassification.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/mpnet#transformers.MPNetConfig"
>MPNetConfig</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>
`}}),Ao=new Ne({props:{$$slots:{default:[Y_]},$$scope:{ctx:Q}}}),Fs=new Ye({props:{code:`from transformers import MPNetTokenizer, TFMPNetForTokenClassification
import tensorflow as tf

tokenizer = MPNetTokenizer.from_pretrained("microsoft/mpnet-base")
model = TFMPNetForTokenClassification.from_pretrained("microsoft/mpnet-base")

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

outputs = model(inputs)
loss = outputs.loss
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MPNetTokenizer, TFMPNetForTokenClassification
<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 = MPNetTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFMPNetForTokenClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = inputs[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs[<span class="hljs-string">&quot;labels&quot;</span>] = tf.reshape(
<span class="hljs-meta">... </span>    tf.constant([<span class="hljs-number">1</span>] * tf.size(input_ids).numpy()), (-<span class="hljs-number">1</span>, tf.size(input_ids))
<span class="hljs-meta">&gt;&gt;&gt; </span>)  <span class="hljs-comment"># Batch size 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),zs=new je({}),Es=new J({props:{name:"class transformers.TFMPNetForQuestionAnswering",anchor:"transformers.TFMPNetForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_tf_mpnet.py#L1255",parametersDescription:[{anchor:"transformers.TFMPNetForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.MPNetConfig">MPNetConfig</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"}]}}),Do=new Ne({props:{$$slots:{default:[Z_]},$$scope:{ctx:Q}}}),xs=new J({props:{name:"call",anchor:"transformers.TFMPNetForQuestionAnswering.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"start_positions",val:" = None"},{name:"end_positions",val:" = None"},{name:"training",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/mpnet/modeling_tf_mpnet.py#L1268",parametersDescription:[{anchor:"transformers.TFMPNetForQuestionAnswering.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/mpnet#transformers.MPNetTokenizer">MPNetTokenizer</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.TFMPNetForQuestionAnswering.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.TFMPNetForQuestionAnswering.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.TFMPNetForQuestionAnswering.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.TFMPNetForQuestionAnswering.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.TFMPNetForQuestionAnswering.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.TFMPNetForQuestionAnswering.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.TFMPNetForQuestionAnswering.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.TFMPNetForQuestionAnswering.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.TFMPNetForQuestionAnswering.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.TFMPNetForQuestionAnswering.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/mpnet#transformers.MPNetConfig"
>MPNetConfig</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>
`}}),So=new Ne({props:{$$slots:{default:[ek]},$$scope:{ctx:Q}}}),Ls=new Ye({props:{code:`from transformers import MPNetTokenizer, TFMPNetForQuestionAnswering
import tensorflow as tf

tokenizer = MPNetTokenizer.from_pretrained("microsoft/mpnet-base")
model = TFMPNetForQuestionAnswering.from_pretrained("microsoft/mpnet-base")

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

all_tokens = tokenizer.convert_ids_to_tokens(input_dict["input_ids"].numpy()[0])
answer = " ".join(all_tokens[tf.math.argmax(start_logits, 1)[0] : tf.math.argmax(end_logits, 1)[0] + 1])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MPNetTokenizer, TFMPNetForQuestionAnswering
<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 = MPNetTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFMPNetForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;microsoft/mpnet-base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>all_tokens = tokenizer.convert_ids_to_tokens(input_dict[<span class="hljs-string">&quot;input_ids&quot;</span>].numpy()[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>answer = <span class="hljs-string">&quot; &quot;</span>.join(all_tokens[tf.math.argmax(start_logits, <span class="hljs-number">1</span>)[<span class="hljs-number">0</span>] : tf.math.argmax(end_logits, <span class="hljs-number">1</span>)[<span class="hljs-number">0</span>] + <span class="hljs-number">1</span>])`}}),{c(){p=n("meta"),y=l(),f=n("h1"),g=n("a"),v=n("span"),M(k.$$.fragment),_=l(),F=n("span"),le=a("MPNet"),U=l(),z=n("h2"),X=n("a"),S=n("span"),M(G.$$.fragment),de=l(),O=n("span"),ce=a("Overview"),se=l(),R=n("p"),A=a("The MPNet model was proposed in "),Y=n("a"),V=a("MPNet: Masked and Permuted Pre-training for Language Understanding"),E=a(" by Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, Tie-Yan Liu."),q=l(),Z=n("p"),B=a(`MPNet adopts a novel pre-training method, named masked and permuted language modeling, to inherit the advantages of
masked language modeling and permuted language modeling for natural language understanding.`),re=l(),ee=n("p"),H=a("The abstract from the paper is the following:"),ae=l(),te=n("p"),C=n("em"),pe=a(`BERT adopts masked language modeling (MLM) for pre-training and is one of the most successful pre-training models.
Since BERT neglects dependency among predicted tokens, XLNet introduces permuted language modeling (PLM) for
pre-training to address this problem. However, XLNet does not leverage the full position information of a sentence and
thus suffers from position discrepancy between pre-training and fine-tuning. In this paper, we propose MPNet, a novel
pre-training method that inherits the advantages of BERT and XLNet and avoids their limitations. MPNet leverages the
dependency among predicted tokens through permuted language modeling (vs. MLM in BERT), and takes auxiliary position
information as input to make the model see a full sentence and thus reducing the position discrepancy (vs. PLM in
XLNet). We pre-train MPNet on a large-scale dataset (over 160GB text corpora) and fine-tune on a variety of
down-streaming tasks (GLUE, SQuAD, etc). Experimental results show that MPNet outperforms MLM and PLM by a large
margin, and achieves better results on these tasks compared with previous state-of-the-art pre-trained methods (e.g.,
BERT, XLNet, RoBERTa) under the same model setting.`),W=l(),oe=n("p"),he=a("Tips:"),x=l(),ne=n("ul"),j=n("li"),me=a("MPNet doesn\u2019t have "),c=n("code"),T=a("token_type_ids"),K=a(`, you don\u2019t need to indicate which token belongs to which segment. just
separate your segments with the separation token `),_e=n("code"),ve=a("tokenizer.sep_token"),I=a(" (or "),ke=n("code"),Te=a("[sep]"),Me=a(")."),L=l(),D=n("p"),be=a("The original code can be found "),ge=n("a"),ue=a("here"),we=a("."),ie=l(),fe=n("h2"),no=n("a"),jr=n("span"),M(Qo.$$.fragment),Sl=l(),xr=n("span"),Ol=a("MPNetConfig"),fi=l(),xe=n("div"),M(Bo.$$.fragment),Wl=l(),it=n("p"),Ql=a("This is the configuration class to store the configuration of a "),Ss=n("a"),Bl=a("MPNetModel"),Hl=a(" or a "),Os=n("a"),Rl=a("TFMPNetModel"),Ul=a(`. It is used to
instantiate a MPNet model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the MPNet
`),Ho=n("a"),Vl=a("mpnet-base"),Kl=a(" architecture."),Xl=l(),yt=n("p"),Jl=a("Configuration objects inherit from "),Ws=n("a"),Gl=a("PretrainedConfig"),Yl=a(` and can be used to control the model outputs. Read the
documentation from `),Qs=n("a"),Zl=a("PretrainedConfig"),ed=a(" for more information."),td=l(),Lr=n("p"),od=a("Examples:"),nd=l(),M(Ro.$$.fragment),gi=l(),Ft=n("h2"),so=n("a"),Ar=n("span"),M(Uo.$$.fragment),sd=l(),Ir=n("span"),rd=a("MPNetTokenizer"),_i=l(),$e=n("div"),M(Vo.$$.fragment),ad=l(),Ko=n("p"),id=a("This tokenizer inherits from "),Bs=n("a"),ld=a("BertTokenizer"),dd=a(` which contains most of the methods. Users should refer to the
superclass for more information regarding methods.`),cd=l(),dt=n("div"),M(Xo.$$.fragment),pd=l(),Dr=n("p"),hd=a(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A MPNet sequence has the following format:`),md=l(),Jo=n("ul"),Hs=n("li"),ud=a("single sequence: "),Sr=n("code"),fd=a("<s> X </s>"),gd=l(),Rs=n("li"),_d=a("pair of sequences: "),Or=n("code"),kd=a("<s> A </s></s> B </s>"),vd=l(),ro=n("div"),M(Go.$$.fragment),Td=l(),Yo=n("p"),Md=a(`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Wr=n("code"),bd=a("prepare_for_model"),wd=a(" methods."),Pd=l(),ao=n("div"),M(Zo.$$.fragment),Nd=l(),Qr=n("p"),$d=a(`Creates a mask from the two sequences passed to be used in a sequence-pair classification task. MPNet does not
make use of token type ids, therefore a list of zeros is returned.`),yd=l(),Us=n("div"),M(en.$$.fragment),ki=l(),zt=n("h2"),io=n("a"),Br=n("span"),M(tn.$$.fragment),Fd=l(),Hr=n("span"),zd=a("MPNetTokenizerFast"),vi=l(),Ze=n("div"),M(on.$$.fragment),Ed=l(),nn=n("p"),qd=a("Construct a \u201Cfast\u201D MPNet tokenizer (backed by HuggingFace\u2019s "),Rr=n("em"),Cd=a("tokenizers"),jd=a(" library). Based on WordPiece."),xd=l(),sn=n("p"),Ld=a("This tokenizer inherits from "),Vs=n("a"),Ad=a("PreTrainedTokenizerFast"),Id=a(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Dd=l(),lo=n("div"),M(rn.$$.fragment),Sd=l(),Ur=n("p"),Od=a(`Creates a mask from the two sequences passed to be used in a sequence-pair classification task. MPNet does not
make use of token type ids, therefore a list of zeros is returned`),Ti=l(),Et=n("h2"),co=n("a"),Vr=n("span"),M(an.$$.fragment),Wd=l(),Kr=n("span"),Qd=a("MPNetModel"),Mi=l(),Le=n("div"),M(ln.$$.fragment),Bd=l(),Xr=n("p"),Hd=a("The bare MPNet Model transformer outputting raw hidden-states without any specific head on top."),Rd=l(),dn=n("p"),Ud=a("This model inherits from "),Ks=n("a"),Vd=a("PreTrainedModel"),Kd=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Xd=l(),cn=n("p"),Jd=a("This model is also a PyTorch "),pn=n("a"),Gd=a("torch.nn.Module"),Yd=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Zd=l(),Oe=n("div"),M(hn.$$.fragment),ec=l(),qt=n("p"),tc=a("The "),Xs=n("a"),oc=a("MPNetModel"),nc=a(" forward method, overrides the "),Jr=n("code"),sc=a("__call__"),rc=a(" special method."),ac=l(),M(po.$$.fragment),ic=l(),Gr=n("p"),lc=a("Example:"),dc=l(),M(mn.$$.fragment),bi=l(),Ct=n("h2"),ho=n("a"),Yr=n("span"),M(un.$$.fragment),cc=l(),Zr=n("span"),pc=a("MPNetForMaskedLM"),wi=l(),jt=n("div"),M(fn.$$.fragment),hc=l(),We=n("div"),M(gn.$$.fragment),mc=l(),xt=n("p"),uc=a("The "),Js=n("a"),fc=a("MPNetForMaskedLM"),gc=a(" forward method, overrides the "),ea=n("code"),_c=a("__call__"),kc=a(" special method."),vc=l(),M(mo.$$.fragment),Tc=l(),ta=n("p"),Mc=a("Example:"),bc=l(),M(_n.$$.fragment),Pi=l(),Lt=n("h2"),uo=n("a"),oa=n("span"),M(kn.$$.fragment),wc=l(),na=n("span"),Pc=a("MPNetForSequenceClassification"),Ni=l(),Ae=n("div"),M(vn.$$.fragment),Nc=l(),sa=n("p"),$c=a(`MPNet Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),yc=l(),Tn=n("p"),Fc=a("This model inherits from "),Gs=n("a"),zc=a("PreTrainedModel"),Ec=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),qc=l(),Mn=n("p"),Cc=a("This model is also a PyTorch "),bn=n("a"),jc=a("torch.nn.Module"),xc=a(` 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(),Pe=n("div"),M(wn.$$.fragment),Ac=l(),At=n("p"),Ic=a("The "),Ys=n("a"),Dc=a("MPNetForSequenceClassification"),Sc=a(" forward method, overrides the "),ra=n("code"),Oc=a("__call__"),Wc=a(" special method."),Qc=l(),M(fo.$$.fragment),Bc=l(),aa=n("p"),Hc=a("Example of single-label classification:"),Rc=l(),M(Pn.$$.fragment),Uc=l(),ia=n("p"),Vc=a("Example of multi-label classification:"),Kc=l(),M(Nn.$$.fragment),$i=l(),It=n("h2"),go=n("a"),la=n("span"),M($n.$$.fragment),Xc=l(),da=n("span"),Jc=a("MPNetForMultipleChoice"),yi=l(),Ie=n("div"),M(yn.$$.fragment),Gc=l(),ca=n("p"),Yc=a(`MPNet 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.`),Zc=l(),Fn=n("p"),ep=a("This model inherits from "),Zs=n("a"),tp=a("PreTrainedModel"),op=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),np=l(),zn=n("p"),sp=a("This model is also a PyTorch "),En=n("a"),rp=a("torch.nn.Module"),ap=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ip=l(),Qe=n("div"),M(qn.$$.fragment),lp=l(),Dt=n("p"),dp=a("The "),er=n("a"),cp=a("MPNetForMultipleChoice"),pp=a(" forward method, overrides the "),pa=n("code"),hp=a("__call__"),mp=a(" special method."),up=l(),M(_o.$$.fragment),fp=l(),ha=n("p"),gp=a("Example:"),_p=l(),M(Cn.$$.fragment),Fi=l(),St=n("h2"),ko=n("a"),ma=n("span"),M(jn.$$.fragment),kp=l(),ua=n("span"),vp=a("MPNetForTokenClassification"),zi=l(),De=n("div"),M(xn.$$.fragment),Tp=l(),fa=n("p"),Mp=a(`MPNet 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.`),bp=l(),Ln=n("p"),wp=a("This model inherits from "),tr=n("a"),Pp=a("PreTrainedModel"),Np=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),$p=l(),An=n("p"),yp=a("This model is also a PyTorch "),In=n("a"),Fp=a("torch.nn.Module"),zp=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ep=l(),Be=n("div"),M(Dn.$$.fragment),qp=l(),Ot=n("p"),Cp=a("The "),or=n("a"),jp=a("MPNetForTokenClassification"),xp=a(" forward method, overrides the "),ga=n("code"),Lp=a("__call__"),Ap=a(" special method."),Ip=l(),M(vo.$$.fragment),Dp=l(),_a=n("p"),Sp=a("Example:"),Op=l(),M(Sn.$$.fragment),Ei=l(),Wt=n("h2"),To=n("a"),ka=n("span"),M(On.$$.fragment),Wp=l(),va=n("span"),Qp=a("MPNetForQuestionAnswering"),qi=l(),Se=n("div"),M(Wn.$$.fragment),Bp=l(),Qt=n("p"),Hp=a(`MPNet 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 `),Ta=n("code"),Rp=a("span start logits"),Up=a(" and "),Ma=n("code"),Vp=a("span end logits"),Kp=a(")."),Xp=l(),Qn=n("p"),Jp=a("This model inherits from "),nr=n("a"),Gp=a("PreTrainedModel"),Yp=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Zp=l(),Bn=n("p"),eh=a("This model is also a PyTorch "),Hn=n("a"),th=a("torch.nn.Module"),oh=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),nh=l(),He=n("div"),M(Rn.$$.fragment),sh=l(),Bt=n("p"),rh=a("The "),sr=n("a"),ah=a("MPNetForQuestionAnswering"),ih=a(" forward method, overrides the "),ba=n("code"),lh=a("__call__"),dh=a(" special method."),ch=l(),M(Mo.$$.fragment),ph=l(),wa=n("p"),hh=a("Example:"),mh=l(),M(Un.$$.fragment),Ci=l(),Ht=n("h2"),bo=n("a"),Pa=n("span"),M(Vn.$$.fragment),uh=l(),Na=n("span"),fh=a("TFMPNetModel"),ji=l(),ye=n("div"),M(Kn.$$.fragment),gh=l(),$a=n("p"),_h=a("The bare MPNet Model transformer outputting raw hidden-states without any specific head on top."),kh=l(),Xn=n("p"),vh=a("This model inherits from "),rr=n("a"),Th=a("TFPreTrainedModel"),Mh=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),bh=l(),Jn=n("p"),wh=a("This model is also a "),Gn=n("a"),Ph=a("tf.keras.Model"),Nh=a(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),$h=l(),M(wo.$$.fragment),yh=l(),Re=n("div"),M(Yn.$$.fragment),Fh=l(),Rt=n("p"),zh=a("The "),ar=n("a"),Eh=a("TFMPNetModel"),qh=a(" forward method, overrides the "),ya=n("code"),Ch=a("__call__"),jh=a(" special method."),xh=l(),M(Po.$$.fragment),Lh=l(),Fa=n("p"),Ah=a("Example:"),Ih=l(),M(Zn.$$.fragment),xi=l(),Ut=n("h2"),No=n("a"),za=n("span"),M(es.$$.fragment),Dh=l(),Ea=n("span"),Sh=a("TFMPNetForMaskedLM"),Li=l(),Fe=n("div"),M(ts.$$.fragment),Oh=l(),os=n("p"),Wh=a("MPNet Model with a "),qa=n("code"),Qh=a("language modeling"),Bh=a(" head on top."),Hh=l(),ns=n("p"),Rh=a("This model inherits from "),ir=n("a"),Uh=a("TFPreTrainedModel"),Vh=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Kh=l(),ss=n("p"),Xh=a("This model is also a "),rs=n("a"),Jh=a("tf.keras.Model"),Gh=a(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Yh=l(),M($o.$$.fragment),Zh=l(),Ue=n("div"),M(as.$$.fragment),em=l(),Vt=n("p"),tm=a("The "),lr=n("a"),om=a("TFMPNetForMaskedLM"),nm=a(" forward method, overrides the "),Ca=n("code"),sm=a("__call__"),rm=a(" special method."),am=l(),M(yo.$$.fragment),im=l(),ja=n("p"),lm=a("Example:"),dm=l(),M(is.$$.fragment),Ai=l(),Kt=n("h2"),Fo=n("a"),xa=n("span"),M(ls.$$.fragment),cm=l(),La=n("span"),pm=a("TFMPNetForSequenceClassification"),Ii=l(),ze=n("div"),M(ds.$$.fragment),hm=l(),Aa=n("p"),mm=a(`MPNet Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),um=l(),cs=n("p"),fm=a("This model inherits from "),dr=n("a"),gm=a("TFPreTrainedModel"),_m=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),km=l(),ps=n("p"),vm=a("This model is also a "),hs=n("a"),Tm=a("tf.keras.Model"),Mm=a(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),bm=l(),M(zo.$$.fragment),wm=l(),Ve=n("div"),M(ms.$$.fragment),Pm=l(),Xt=n("p"),Nm=a("The "),cr=n("a"),$m=a("TFMPNetForSequenceClassification"),ym=a(" forward method, overrides the "),Ia=n("code"),Fm=a("__call__"),zm=a(" special method."),Em=l(),M(Eo.$$.fragment),qm=l(),Da=n("p"),Cm=a("Example:"),jm=l(),M(us.$$.fragment),Di=l(),Jt=n("h2"),qo=n("a"),Sa=n("span"),M(fs.$$.fragment),xm=l(),Oa=n("span"),Lm=a("TFMPNetForMultipleChoice"),Si=l(),Ee=n("div"),M(gs.$$.fragment),Am=l(),Wa=n("p"),Im=a(`MPNet 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.`),Dm=l(),_s=n("p"),Sm=a("This model inherits from "),pr=n("a"),Om=a("TFPreTrainedModel"),Wm=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Qm=l(),ks=n("p"),Bm=a("This model is also a "),vs=n("a"),Hm=a("tf.keras.Model"),Rm=a(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Um=l(),M(Co.$$.fragment),Vm=l(),Ke=n("div"),M(Ts.$$.fragment),Km=l(),Gt=n("p"),Xm=a("The "),hr=n("a"),Jm=a("TFMPNetForMultipleChoice"),Gm=a(" forward method, overrides the "),Qa=n("code"),Ym=a("__call__"),Zm=a(" special method."),eu=l(),M(jo.$$.fragment),tu=l(),Ba=n("p"),ou=a("Example:"),nu=l(),M(Ms.$$.fragment),Oi=l(),Yt=n("h2"),xo=n("a"),Ha=n("span"),M(bs.$$.fragment),su=l(),Ra=n("span"),ru=a("TFMPNetForTokenClassification"),Wi=l(),qe=n("div"),M(ws.$$.fragment),au=l(),Ua=n("p"),iu=a(`MPNet 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.`),lu=l(),Ps=n("p"),du=a("This model inherits from "),mr=n("a"),cu=a("TFPreTrainedModel"),pu=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),hu=l(),Ns=n("p"),mu=a("This model is also a "),$s=n("a"),uu=a("tf.keras.Model"),fu=a(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),gu=l(),M(Lo.$$.fragment),_u=l(),Xe=n("div"),M(ys.$$.fragment),ku=l(),Zt=n("p"),vu=a("The "),ur=n("a"),Tu=a("TFMPNetForTokenClassification"),Mu=a(" forward method, overrides the "),Va=n("code"),bu=a("__call__"),wu=a(" special method."),Pu=l(),M(Ao.$$.fragment),Nu=l(),Ka=n("p"),$u=a("Example:"),yu=l(),M(Fs.$$.fragment),Qi=l(),eo=n("h2"),Io=n("a"),Xa=n("span"),M(zs.$$.fragment),Fu=l(),Ja=n("span"),zu=a("TFMPNetForQuestionAnswering"),Bi=l(),Ce=n("div"),M(Es.$$.fragment),Eu=l(),to=n("p"),qu=a(`MPNet 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 `),Ga=n("code"),Cu=a("span start logits"),ju=a(" and "),Ya=n("code"),xu=a("span end logits"),Lu=a(")."),Au=l(),qs=n("p"),Iu=a("This model inherits from "),fr=n("a"),Du=a("TFPreTrainedModel"),Su=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Ou=l(),Cs=n("p"),Wu=a("This model is also a "),js=n("a"),Qu=a("tf.keras.Model"),Bu=a(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Hu=l(),M(Do.$$.fragment),Ru=l(),Je=n("div"),M(xs.$$.fragment),Uu=l(),oo=n("p"),Vu=a("The "),gr=n("a"),Ku=a("TFMPNetForQuestionAnswering"),Xu=a(" forward method, overrides the "),Za=n("code"),Ju=a("__call__"),Gu=a(" special method."),Yu=l(),M(So.$$.fragment),Zu=l(),ei=n("p"),ef=a("Example:"),tf=l(),M(Ls.$$.fragment),this.h()},l(o){const u=A_('[data-svelte="svelte-1phssyn"]',document.head);p=s(u,"META",{name:!0,content:!0}),u.forEach(t),y=d(o),f=s(o,"H1",{class:!0});var As=r(f);g=s(As,"A",{id:!0,class:!0,href:!0});var ti=r(g);v=s(ti,"SPAN",{});var oi=r(v);b(k.$$.fragment,oi),oi.forEach(t),ti.forEach(t),_=d(As),F=s(As,"SPAN",{});var ni=r(F);le=i(ni,"MPNet"),ni.forEach(t),As.forEach(t),U=d(o),z=s(o,"H2",{class:!0});var Is=r(z);X=s(Is,"A",{id:!0,class:!0,href:!0});var si=r(X);S=s(si,"SPAN",{});var ri=r(S);b(G.$$.fragment,ri),ri.forEach(t),si.forEach(t),de=d(Is),O=s(Is,"SPAN",{});var ai=r(O);ce=i(ai,"Overview"),ai.forEach(t),Is.forEach(t),se=d(o),R=s(o,"P",{});var Ds=r(R);A=i(Ds,"The MPNet model was proposed in "),Y=s(Ds,"A",{href:!0,rel:!0});var ii=r(Y);V=i(ii,"MPNet: Masked and Permuted Pre-training for Language Understanding"),ii.forEach(t),E=i(Ds," by Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, Tie-Yan Liu."),Ds.forEach(t),q=d(o),Z=s(o,"P",{});var li=r(Z);B=i(li,`MPNet adopts a novel pre-training method, named masked and permuted language modeling, to inherit the advantages of
masked language modeling and permuted language modeling for natural language understanding.`),li.forEach(t),re=d(o),ee=s(o,"P",{});var di=r(ee);H=i(di,"The abstract from the paper is the following:"),di.forEach(t),ae=d(o),te=s(o,"P",{});var ci=r(te);C=s(ci,"EM",{});var pi=r(C);pe=i(pi,`BERT adopts masked language modeling (MLM) for pre-training and is one of the most successful pre-training models.
Since BERT neglects dependency among predicted tokens, XLNet introduces permuted language modeling (PLM) for
pre-training to address this problem. However, XLNet does not leverage the full position information of a sentence and
thus suffers from position discrepancy between pre-training and fine-tuning. In this paper, we propose MPNet, a novel
pre-training method that inherits the advantages of BERT and XLNet and avoids their limitations. MPNet leverages the
dependency among predicted tokens through permuted language modeling (vs. MLM in BERT), and takes auxiliary position
information as input to make the model see a full sentence and thus reducing the position discrepancy (vs. PLM in
XLNet). We pre-train MPNet on a large-scale dataset (over 160GB text corpora) and fine-tune on a variety of
down-streaming tasks (GLUE, SQuAD, etc). Experimental results show that MPNet outperforms MLM and PLM by a large
margin, and achieves better results on these tasks compared with previous state-of-the-art pre-trained methods (e.g.,
BERT, XLNet, RoBERTa) under the same model setting.`),pi.forEach(t),ci.forEach(t),W=d(o),oe=s(o,"P",{});var hi=r(oe);he=i(hi,"Tips:"),hi.forEach(t),x=d(o),ne=s(o,"UL",{});var mi=r(ne);j=s(mi,"LI",{});var lt=r(j);me=i(lt,"MPNet doesn\u2019t have "),c=s(lt,"CODE",{});var ui=r(c);T=i(ui,"token_type_ids"),ui.forEach(t),K=i(lt,`, you don\u2019t need to indicate which token belongs to which segment. just
separate your segments with the separation token `),_e=s(lt,"CODE",{});var sf=r(_e);ve=i(sf,"tokenizer.sep_token"),sf.forEach(t),I=i(lt," (or "),ke=s(lt,"CODE",{});var rf=r(ke);Te=i(rf,"[sep]"),rf.forEach(t),Me=i(lt,")."),lt.forEach(t),mi.forEach(t),L=d(o),D=s(o,"P",{});var Ri=r(D);be=i(Ri,"The original code can be found "),ge=s(Ri,"A",{href:!0,rel:!0});var af=r(ge);ue=i(af,"here"),af.forEach(t),we=i(Ri,"."),Ri.forEach(t),ie=d(o),fe=s(o,"H2",{class:!0});var Ui=r(fe);no=s(Ui,"A",{id:!0,class:!0,href:!0});var lf=r(no);jr=s(lf,"SPAN",{});var df=r(jr);b(Qo.$$.fragment,df),df.forEach(t),lf.forEach(t),Sl=d(Ui),xr=s(Ui,"SPAN",{});var cf=r(xr);Ol=i(cf,"MPNetConfig"),cf.forEach(t),Ui.forEach(t),fi=d(o),xe=s(o,"DIV",{class:!0});var ct=r(xe);b(Bo.$$.fragment,ct),Wl=d(ct),it=s(ct,"P",{});var Oo=r(it);Ql=i(Oo,"This is the configuration class to store the configuration of a "),Ss=s(Oo,"A",{href:!0});var pf=r(Ss);Bl=i(pf,"MPNetModel"),pf.forEach(t),Hl=i(Oo," or a "),Os=s(Oo,"A",{href:!0});var hf=r(Os);Rl=i(hf,"TFMPNetModel"),hf.forEach(t),Ul=i(Oo,`. It is used to
instantiate a MPNet model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the MPNet
`),Ho=s(Oo,"A",{href:!0,rel:!0});var mf=r(Ho);Vl=i(mf,"mpnet-base"),mf.forEach(t),Kl=i(Oo," architecture."),Oo.forEach(t),Xl=d(ct),yt=s(ct,"P",{});var _r=r(yt);Jl=i(_r,"Configuration objects inherit from "),Ws=s(_r,"A",{href:!0});var uf=r(Ws);Gl=i(uf,"PretrainedConfig"),uf.forEach(t),Yl=i(_r,` and can be used to control the model outputs. Read the
documentation from `),Qs=s(_r,"A",{href:!0});var ff=r(Qs);Zl=i(ff,"PretrainedConfig"),ff.forEach(t),ed=i(_r," for more information."),_r.forEach(t),td=d(ct),Lr=s(ct,"P",{});var gf=r(Lr);od=i(gf,"Examples:"),gf.forEach(t),nd=d(ct),b(Ro.$$.fragment,ct),ct.forEach(t),gi=d(o),Ft=s(o,"H2",{class:!0});var Vi=r(Ft);so=s(Vi,"A",{id:!0,class:!0,href:!0});var _f=r(so);Ar=s(_f,"SPAN",{});var kf=r(Ar);b(Uo.$$.fragment,kf),kf.forEach(t),_f.forEach(t),sd=d(Vi),Ir=s(Vi,"SPAN",{});var vf=r(Ir);rd=i(vf,"MPNetTokenizer"),vf.forEach(t),Vi.forEach(t),_i=d(o),$e=s(o,"DIV",{class:!0});var et=r($e);b(Vo.$$.fragment,et),ad=d(et),Ko=s(et,"P",{});var Ki=r(Ko);id=i(Ki,"This tokenizer inherits from "),Bs=s(Ki,"A",{href:!0});var Tf=r(Bs);ld=i(Tf,"BertTokenizer"),Tf.forEach(t),dd=i(Ki,` which contains most of the methods. Users should refer to the
superclass for more information regarding methods.`),Ki.forEach(t),cd=d(et),dt=s(et,"DIV",{class:!0});var kr=r(dt);b(Xo.$$.fragment,kr),pd=d(kr),Dr=s(kr,"P",{});var Mf=r(Dr);hd=i(Mf,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A MPNet sequence has the following format:`),Mf.forEach(t),md=d(kr),Jo=s(kr,"UL",{});var Xi=r(Jo);Hs=s(Xi,"LI",{});var of=r(Hs);ud=i(of,"single sequence: "),Sr=s(of,"CODE",{});var bf=r(Sr);fd=i(bf,"<s> X </s>"),bf.forEach(t),of.forEach(t),gd=d(Xi),Rs=s(Xi,"LI",{});var nf=r(Rs);_d=i(nf,"pair of sequences: "),Or=s(nf,"CODE",{});var wf=r(Or);kd=i(wf,"<s> A </s></s> B </s>"),wf.forEach(t),nf.forEach(t),Xi.forEach(t),kr.forEach(t),vd=d(et),ro=s(et,"DIV",{class:!0});var Ji=r(ro);b(Go.$$.fragment,Ji),Td=d(Ji),Yo=s(Ji,"P",{});var Gi=r(Yo);Md=i(Gi,`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Wr=s(Gi,"CODE",{});var Pf=r(Wr);bd=i(Pf,"prepare_for_model"),Pf.forEach(t),wd=i(Gi," methods."),Gi.forEach(t),Ji.forEach(t),Pd=d(et),ao=s(et,"DIV",{class:!0});var Yi=r(ao);b(Zo.$$.fragment,Yi),Nd=d(Yi),Qr=s(Yi,"P",{});var Nf=r(Qr);$d=i(Nf,`Creates a mask from the two sequences passed to be used in a sequence-pair classification task. MPNet does not
make use of token type ids, therefore a list of zeros is returned.`),Nf.forEach(t),Yi.forEach(t),yd=d(et),Us=s(et,"DIV",{class:!0});var $f=r(Us);b(en.$$.fragment,$f),$f.forEach(t),et.forEach(t),ki=d(o),zt=s(o,"H2",{class:!0});var Zi=r(zt);io=s(Zi,"A",{id:!0,class:!0,href:!0});var yf=r(io);Br=s(yf,"SPAN",{});var Ff=r(Br);b(tn.$$.fragment,Ff),Ff.forEach(t),yf.forEach(t),Fd=d(Zi),Hr=s(Zi,"SPAN",{});var zf=r(Hr);zd=i(zf,"MPNetTokenizerFast"),zf.forEach(t),Zi.forEach(t),vi=d(o),Ze=s(o,"DIV",{class:!0});var Wo=r(Ze);b(on.$$.fragment,Wo),Ed=d(Wo),nn=s(Wo,"P",{});var el=r(nn);qd=i(el,"Construct a \u201Cfast\u201D MPNet tokenizer (backed by HuggingFace\u2019s "),Rr=s(el,"EM",{});var Ef=r(Rr);Cd=i(Ef,"tokenizers"),Ef.forEach(t),jd=i(el," library). Based on WordPiece."),el.forEach(t),xd=d(Wo),sn=s(Wo,"P",{});var tl=r(sn);Ld=i(tl,"This tokenizer inherits from "),Vs=s(tl,"A",{href:!0});var qf=r(Vs);Ad=i(qf,"PreTrainedTokenizerFast"),qf.forEach(t),Id=i(tl,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),tl.forEach(t),Dd=d(Wo),lo=s(Wo,"DIV",{class:!0});var ol=r(lo);b(rn.$$.fragment,ol),Sd=d(ol),Ur=s(ol,"P",{});var Cf=r(Ur);Od=i(Cf,`Creates a mask from the two sequences passed to be used in a sequence-pair classification task. MPNet does not
make use of token type ids, therefore a list of zeros is returned`),Cf.forEach(t),ol.forEach(t),Wo.forEach(t),Ti=d(o),Et=s(o,"H2",{class:!0});var nl=r(Et);co=s(nl,"A",{id:!0,class:!0,href:!0});var jf=r(co);Vr=s(jf,"SPAN",{});var xf=r(Vr);b(an.$$.fragment,xf),xf.forEach(t),jf.forEach(t),Wd=d(nl),Kr=s(nl,"SPAN",{});var Lf=r(Kr);Qd=i(Lf,"MPNetModel"),Lf.forEach(t),nl.forEach(t),Mi=d(o),Le=s(o,"DIV",{class:!0});var pt=r(Le);b(ln.$$.fragment,pt),Bd=d(pt),Xr=s(pt,"P",{});var Af=r(Xr);Hd=i(Af,"The bare MPNet Model transformer outputting raw hidden-states without any specific head on top."),Af.forEach(t),Rd=d(pt),dn=s(pt,"P",{});var sl=r(dn);Ud=i(sl,"This model inherits from "),Ks=s(sl,"A",{href:!0});var If=r(Ks);Vd=i(If,"PreTrainedModel"),If.forEach(t),Kd=i(sl,`. 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.)`),sl.forEach(t),Xd=d(pt),cn=s(pt,"P",{});var rl=r(cn);Jd=i(rl,"This model is also a PyTorch "),pn=s(rl,"A",{href:!0,rel:!0});var Df=r(pn);Gd=i(Df,"torch.nn.Module"),Df.forEach(t),Yd=i(rl,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),rl.forEach(t),Zd=d(pt),Oe=s(pt,"DIV",{class:!0});var ht=r(Oe);b(hn.$$.fragment,ht),ec=d(ht),qt=s(ht,"P",{});var vr=r(qt);tc=i(vr,"The "),Xs=s(vr,"A",{href:!0});var Sf=r(Xs);oc=i(Sf,"MPNetModel"),Sf.forEach(t),nc=i(vr," forward method, overrides the "),Jr=s(vr,"CODE",{});var Of=r(Jr);sc=i(Of,"__call__"),Of.forEach(t),rc=i(vr," special method."),vr.forEach(t),ac=d(ht),b(po.$$.fragment,ht),ic=d(ht),Gr=s(ht,"P",{});var Wf=r(Gr);lc=i(Wf,"Example:"),Wf.forEach(t),dc=d(ht),b(mn.$$.fragment,ht),ht.forEach(t),pt.forEach(t),bi=d(o),Ct=s(o,"H2",{class:!0});var al=r(Ct);ho=s(al,"A",{id:!0,class:!0,href:!0});var Qf=r(ho);Yr=s(Qf,"SPAN",{});var Bf=r(Yr);b(un.$$.fragment,Bf),Bf.forEach(t),Qf.forEach(t),cc=d(al),Zr=s(al,"SPAN",{});var Hf=r(Zr);pc=i(Hf,"MPNetForMaskedLM"),Hf.forEach(t),al.forEach(t),wi=d(o),jt=s(o,"DIV",{class:!0});var il=r(jt);b(fn.$$.fragment,il),hc=d(il),We=s(il,"DIV",{class:!0});var mt=r(We);b(gn.$$.fragment,mt),mc=d(mt),xt=s(mt,"P",{});var Tr=r(xt);uc=i(Tr,"The "),Js=s(Tr,"A",{href:!0});var Rf=r(Js);fc=i(Rf,"MPNetForMaskedLM"),Rf.forEach(t),gc=i(Tr," forward method, overrides the "),ea=s(Tr,"CODE",{});var Uf=r(ea);_c=i(Uf,"__call__"),Uf.forEach(t),kc=i(Tr," special method."),Tr.forEach(t),vc=d(mt),b(mo.$$.fragment,mt),Tc=d(mt),ta=s(mt,"P",{});var Vf=r(ta);Mc=i(Vf,"Example:"),Vf.forEach(t),bc=d(mt),b(_n.$$.fragment,mt),mt.forEach(t),il.forEach(t),Pi=d(o),Lt=s(o,"H2",{class:!0});var ll=r(Lt);uo=s(ll,"A",{id:!0,class:!0,href:!0});var Kf=r(uo);oa=s(Kf,"SPAN",{});var Xf=r(oa);b(kn.$$.fragment,Xf),Xf.forEach(t),Kf.forEach(t),wc=d(ll),na=s(ll,"SPAN",{});var Jf=r(na);Pc=i(Jf,"MPNetForSequenceClassification"),Jf.forEach(t),ll.forEach(t),Ni=d(o),Ae=s(o,"DIV",{class:!0});var ut=r(Ae);b(vn.$$.fragment,ut),Nc=d(ut),sa=s(ut,"P",{});var Gf=r(sa);$c=i(Gf,`MPNet Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),Gf.forEach(t),yc=d(ut),Tn=s(ut,"P",{});var dl=r(Tn);Fc=i(dl,"This model inherits from "),Gs=s(dl,"A",{href:!0});var Yf=r(Gs);zc=i(Yf,"PreTrainedModel"),Yf.forEach(t),Ec=i(dl,`. 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.)`),dl.forEach(t),qc=d(ut),Mn=s(ut,"P",{});var cl=r(Mn);Cc=i(cl,"This model is also a PyTorch "),bn=s(cl,"A",{href:!0,rel:!0});var Zf=r(bn);jc=i(Zf,"torch.nn.Module"),Zf.forEach(t),xc=i(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),Lc=d(ut),Pe=s(ut,"DIV",{class:!0});var Ge=r(Pe);b(wn.$$.fragment,Ge),Ac=d(Ge),At=s(Ge,"P",{});var Mr=r(At);Ic=i(Mr,"The "),Ys=s(Mr,"A",{href:!0});var eg=r(Ys);Dc=i(eg,"MPNetForSequenceClassification"),eg.forEach(t),Sc=i(Mr," forward method, overrides the "),ra=s(Mr,"CODE",{});var tg=r(ra);Oc=i(tg,"__call__"),tg.forEach(t),Wc=i(Mr," special method."),Mr.forEach(t),Qc=d(Ge),b(fo.$$.fragment,Ge),Bc=d(Ge),aa=s(Ge,"P",{});var og=r(aa);Hc=i(og,"Example of single-label classification:"),og.forEach(t),Rc=d(Ge),b(Pn.$$.fragment,Ge),Uc=d(Ge),ia=s(Ge,"P",{});var ng=r(ia);Vc=i(ng,"Example of multi-label classification:"),ng.forEach(t),Kc=d(Ge),b(Nn.$$.fragment,Ge),Ge.forEach(t),ut.forEach(t),$i=d(o),It=s(o,"H2",{class:!0});var pl=r(It);go=s(pl,"A",{id:!0,class:!0,href:!0});var sg=r(go);la=s(sg,"SPAN",{});var rg=r(la);b($n.$$.fragment,rg),rg.forEach(t),sg.forEach(t),Xc=d(pl),da=s(pl,"SPAN",{});var ag=r(da);Jc=i(ag,"MPNetForMultipleChoice"),ag.forEach(t),pl.forEach(t),yi=d(o),Ie=s(o,"DIV",{class:!0});var ft=r(Ie);b(yn.$$.fragment,ft),Gc=d(ft),ca=s(ft,"P",{});var ig=r(ca);Yc=i(ig,`MPNet 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.`),ig.forEach(t),Zc=d(ft),Fn=s(ft,"P",{});var hl=r(Fn);ep=i(hl,"This model inherits from "),Zs=s(hl,"A",{href:!0});var lg=r(Zs);tp=i(lg,"PreTrainedModel"),lg.forEach(t),op=i(hl,`. 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.)`),hl.forEach(t),np=d(ft),zn=s(ft,"P",{});var ml=r(zn);sp=i(ml,"This model is also a PyTorch "),En=s(ml,"A",{href:!0,rel:!0});var dg=r(En);rp=i(dg,"torch.nn.Module"),dg.forEach(t),ap=i(ml,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ml.forEach(t),ip=d(ft),Qe=s(ft,"DIV",{class:!0});var gt=r(Qe);b(qn.$$.fragment,gt),lp=d(gt),Dt=s(gt,"P",{});var br=r(Dt);dp=i(br,"The "),er=s(br,"A",{href:!0});var cg=r(er);cp=i(cg,"MPNetForMultipleChoice"),cg.forEach(t),pp=i(br," forward method, overrides the "),pa=s(br,"CODE",{});var pg=r(pa);hp=i(pg,"__call__"),pg.forEach(t),mp=i(br," special method."),br.forEach(t),up=d(gt),b(_o.$$.fragment,gt),fp=d(gt),ha=s(gt,"P",{});var hg=r(ha);gp=i(hg,"Example:"),hg.forEach(t),_p=d(gt),b(Cn.$$.fragment,gt),gt.forEach(t),ft.forEach(t),Fi=d(o),St=s(o,"H2",{class:!0});var ul=r(St);ko=s(ul,"A",{id:!0,class:!0,href:!0});var mg=r(ko);ma=s(mg,"SPAN",{});var ug=r(ma);b(jn.$$.fragment,ug),ug.forEach(t),mg.forEach(t),kp=d(ul),ua=s(ul,"SPAN",{});var fg=r(ua);vp=i(fg,"MPNetForTokenClassification"),fg.forEach(t),ul.forEach(t),zi=d(o),De=s(o,"DIV",{class:!0});var _t=r(De);b(xn.$$.fragment,_t),Tp=d(_t),fa=s(_t,"P",{});var gg=r(fa);Mp=i(gg,`MPNet 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.`),gg.forEach(t),bp=d(_t),Ln=s(_t,"P",{});var fl=r(Ln);wp=i(fl,"This model inherits from "),tr=s(fl,"A",{href:!0});var _g=r(tr);Pp=i(_g,"PreTrainedModel"),_g.forEach(t),Np=i(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),$p=d(_t),An=s(_t,"P",{});var gl=r(An);yp=i(gl,"This model is also a PyTorch "),In=s(gl,"A",{href:!0,rel:!0});var kg=r(In);Fp=i(kg,"torch.nn.Module"),kg.forEach(t),zp=i(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),Ep=d(_t),Be=s(_t,"DIV",{class:!0});var kt=r(Be);b(Dn.$$.fragment,kt),qp=d(kt),Ot=s(kt,"P",{});var wr=r(Ot);Cp=i(wr,"The "),or=s(wr,"A",{href:!0});var vg=r(or);jp=i(vg,"MPNetForTokenClassification"),vg.forEach(t),xp=i(wr," forward method, overrides the "),ga=s(wr,"CODE",{});var Tg=r(ga);Lp=i(Tg,"__call__"),Tg.forEach(t),Ap=i(wr," special method."),wr.forEach(t),Ip=d(kt),b(vo.$$.fragment,kt),Dp=d(kt),_a=s(kt,"P",{});var Mg=r(_a);Sp=i(Mg,"Example:"),Mg.forEach(t),Op=d(kt),b(Sn.$$.fragment,kt),kt.forEach(t),_t.forEach(t),Ei=d(o),Wt=s(o,"H2",{class:!0});var _l=r(Wt);To=s(_l,"A",{id:!0,class:!0,href:!0});var bg=r(To);ka=s(bg,"SPAN",{});var wg=r(ka);b(On.$$.fragment,wg),wg.forEach(t),bg.forEach(t),Wp=d(_l),va=s(_l,"SPAN",{});var Pg=r(va);Qp=i(Pg,"MPNetForQuestionAnswering"),Pg.forEach(t),_l.forEach(t),qi=d(o),Se=s(o,"DIV",{class:!0});var vt=r(Se);b(Wn.$$.fragment,vt),Bp=d(vt),Qt=s(vt,"P",{});var Pr=r(Qt);Hp=i(Pr,`MPNet 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 `),Ta=s(Pr,"CODE",{});var Ng=r(Ta);Rp=i(Ng,"span start logits"),Ng.forEach(t),Up=i(Pr," and "),Ma=s(Pr,"CODE",{});var $g=r(Ma);Vp=i($g,"span end logits"),$g.forEach(t),Kp=i(Pr,")."),Pr.forEach(t),Xp=d(vt),Qn=s(vt,"P",{});var kl=r(Qn);Jp=i(kl,"This model inherits from "),nr=s(kl,"A",{href:!0});var yg=r(nr);Gp=i(yg,"PreTrainedModel"),yg.forEach(t),Yp=i(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),Zp=d(vt),Bn=s(vt,"P",{});var vl=r(Bn);eh=i(vl,"This model is also a PyTorch "),Hn=s(vl,"A",{href:!0,rel:!0});var Fg=r(Hn);th=i(Fg,"torch.nn.Module"),Fg.forEach(t),oh=i(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),nh=d(vt),He=s(vt,"DIV",{class:!0});var Tt=r(He);b(Rn.$$.fragment,Tt),sh=d(Tt),Bt=s(Tt,"P",{});var Nr=r(Bt);rh=i(Nr,"The "),sr=s(Nr,"A",{href:!0});var zg=r(sr);ah=i(zg,"MPNetForQuestionAnswering"),zg.forEach(t),ih=i(Nr," forward method, overrides the "),ba=s(Nr,"CODE",{});var Eg=r(ba);lh=i(Eg,"__call__"),Eg.forEach(t),dh=i(Nr," special method."),Nr.forEach(t),ch=d(Tt),b(Mo.$$.fragment,Tt),ph=d(Tt),wa=s(Tt,"P",{});var qg=r(wa);hh=i(qg,"Example:"),qg.forEach(t),mh=d(Tt),b(Un.$$.fragment,Tt),Tt.forEach(t),vt.forEach(t),Ci=d(o),Ht=s(o,"H2",{class:!0});var Tl=r(Ht);bo=s(Tl,"A",{id:!0,class:!0,href:!0});var Cg=r(bo);Pa=s(Cg,"SPAN",{});var jg=r(Pa);b(Vn.$$.fragment,jg),jg.forEach(t),Cg.forEach(t),uh=d(Tl),Na=s(Tl,"SPAN",{});var xg=r(Na);fh=i(xg,"TFMPNetModel"),xg.forEach(t),Tl.forEach(t),ji=d(o),ye=s(o,"DIV",{class:!0});var tt=r(ye);b(Kn.$$.fragment,tt),gh=d(tt),$a=s(tt,"P",{});var Lg=r($a);_h=i(Lg,"The bare MPNet Model transformer outputting raw hidden-states without any specific head on top."),Lg.forEach(t),kh=d(tt),Xn=s(tt,"P",{});var Ml=r(Xn);vh=i(Ml,"This model inherits from "),rr=s(Ml,"A",{href:!0});var Ag=r(rr);Th=i(Ag,"TFPreTrainedModel"),Ag.forEach(t),Mh=i(Ml,`. 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.)`),Ml.forEach(t),bh=d(tt),Jn=s(tt,"P",{});var bl=r(Jn);wh=i(bl,"This model is also a "),Gn=s(bl,"A",{href:!0,rel:!0});var Ig=r(Gn);Ph=i(Ig,"tf.keras.Model"),Ig.forEach(t),Nh=i(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),$h=d(tt),b(wo.$$.fragment,tt),yh=d(tt),Re=s(tt,"DIV",{class:!0});var Mt=r(Re);b(Yn.$$.fragment,Mt),Fh=d(Mt),Rt=s(Mt,"P",{});var $r=r(Rt);zh=i($r,"The "),ar=s($r,"A",{href:!0});var Dg=r(ar);Eh=i(Dg,"TFMPNetModel"),Dg.forEach(t),qh=i($r," forward method, overrides the "),ya=s($r,"CODE",{});var Sg=r(ya);Ch=i(Sg,"__call__"),Sg.forEach(t),jh=i($r," special method."),$r.forEach(t),xh=d(Mt),b(Po.$$.fragment,Mt),Lh=d(Mt),Fa=s(Mt,"P",{});var Og=r(Fa);Ah=i(Og,"Example:"),Og.forEach(t),Ih=d(Mt),b(Zn.$$.fragment,Mt),Mt.forEach(t),tt.forEach(t),xi=d(o),Ut=s(o,"H2",{class:!0});var wl=r(Ut);No=s(wl,"A",{id:!0,class:!0,href:!0});var Wg=r(No);za=s(Wg,"SPAN",{});var Qg=r(za);b(es.$$.fragment,Qg),Qg.forEach(t),Wg.forEach(t),Dh=d(wl),Ea=s(wl,"SPAN",{});var Bg=r(Ea);Sh=i(Bg,"TFMPNetForMaskedLM"),Bg.forEach(t),wl.forEach(t),Li=d(o),Fe=s(o,"DIV",{class:!0});var ot=r(Fe);b(ts.$$.fragment,ot),Oh=d(ot),os=s(ot,"P",{});var Pl=r(os);Wh=i(Pl,"MPNet Model with a "),qa=s(Pl,"CODE",{});var Hg=r(qa);Qh=i(Hg,"language modeling"),Hg.forEach(t),Bh=i(Pl," head on top."),Pl.forEach(t),Hh=d(ot),ns=s(ot,"P",{});var Nl=r(ns);Rh=i(Nl,"This model inherits from "),ir=s(Nl,"A",{href:!0});var Rg=r(ir);Uh=i(Rg,"TFPreTrainedModel"),Rg.forEach(t),Vh=i(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),Kh=d(ot),ss=s(ot,"P",{});var $l=r(ss);Xh=i($l,"This model is also a "),rs=s($l,"A",{href:!0,rel:!0});var Ug=r(rs);Jh=i(Ug,"tf.keras.Model"),Ug.forEach(t),Gh=i($l,` 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.`),$l.forEach(t),Yh=d(ot),b($o.$$.fragment,ot),Zh=d(ot),Ue=s(ot,"DIV",{class:!0});var bt=r(Ue);b(as.$$.fragment,bt),em=d(bt),Vt=s(bt,"P",{});var yr=r(Vt);tm=i(yr,"The "),lr=s(yr,"A",{href:!0});var Vg=r(lr);om=i(Vg,"TFMPNetForMaskedLM"),Vg.forEach(t),nm=i(yr," forward method, overrides the "),Ca=s(yr,"CODE",{});var Kg=r(Ca);sm=i(Kg,"__call__"),Kg.forEach(t),rm=i(yr," special method."),yr.forEach(t),am=d(bt),b(yo.$$.fragment,bt),im=d(bt),ja=s(bt,"P",{});var Xg=r(ja);lm=i(Xg,"Example:"),Xg.forEach(t),dm=d(bt),b(is.$$.fragment,bt),bt.forEach(t),ot.forEach(t),Ai=d(o),Kt=s(o,"H2",{class:!0});var yl=r(Kt);Fo=s(yl,"A",{id:!0,class:!0,href:!0});var Jg=r(Fo);xa=s(Jg,"SPAN",{});var Gg=r(xa);b(ls.$$.fragment,Gg),Gg.forEach(t),Jg.forEach(t),cm=d(yl),La=s(yl,"SPAN",{});var Yg=r(La);pm=i(Yg,"TFMPNetForSequenceClassification"),Yg.forEach(t),yl.forEach(t),Ii=d(o),ze=s(o,"DIV",{class:!0});var nt=r(ze);b(ds.$$.fragment,nt),hm=d(nt),Aa=s(nt,"P",{});var Zg=r(Aa);mm=i(Zg,`MPNet Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),Zg.forEach(t),um=d(nt),cs=s(nt,"P",{});var Fl=r(cs);fm=i(Fl,"This model inherits from "),dr=s(Fl,"A",{href:!0});var e_=r(dr);gm=i(e_,"TFPreTrainedModel"),e_.forEach(t),_m=i(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),km=d(nt),ps=s(nt,"P",{});var zl=r(ps);vm=i(zl,"This model is also a "),hs=s(zl,"A",{href:!0,rel:!0});var t_=r(hs);Tm=i(t_,"tf.keras.Model"),t_.forEach(t),Mm=i(zl,` 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.`),zl.forEach(t),bm=d(nt),b(zo.$$.fragment,nt),wm=d(nt),Ve=s(nt,"DIV",{class:!0});var wt=r(Ve);b(ms.$$.fragment,wt),Pm=d(wt),Xt=s(wt,"P",{});var Fr=r(Xt);Nm=i(Fr,"The "),cr=s(Fr,"A",{href:!0});var o_=r(cr);$m=i(o_,"TFMPNetForSequenceClassification"),o_.forEach(t),ym=i(Fr," forward method, overrides the "),Ia=s(Fr,"CODE",{});var n_=r(Ia);Fm=i(n_,"__call__"),n_.forEach(t),zm=i(Fr," special method."),Fr.forEach(t),Em=d(wt),b(Eo.$$.fragment,wt),qm=d(wt),Da=s(wt,"P",{});var s_=r(Da);Cm=i(s_,"Example:"),s_.forEach(t),jm=d(wt),b(us.$$.fragment,wt),wt.forEach(t),nt.forEach(t),Di=d(o),Jt=s(o,"H2",{class:!0});var El=r(Jt);qo=s(El,"A",{id:!0,class:!0,href:!0});var r_=r(qo);Sa=s(r_,"SPAN",{});var a_=r(Sa);b(fs.$$.fragment,a_),a_.forEach(t),r_.forEach(t),xm=d(El),Oa=s(El,"SPAN",{});var i_=r(Oa);Lm=i(i_,"TFMPNetForMultipleChoice"),i_.forEach(t),El.forEach(t),Si=d(o),Ee=s(o,"DIV",{class:!0});var st=r(Ee);b(gs.$$.fragment,st),Am=d(st),Wa=s(st,"P",{});var l_=r(Wa);Im=i(l_,`MPNet 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.`),l_.forEach(t),Dm=d(st),_s=s(st,"P",{});var ql=r(_s);Sm=i(ql,"This model inherits from "),pr=s(ql,"A",{href:!0});var d_=r(pr);Om=i(d_,"TFPreTrainedModel"),d_.forEach(t),Wm=i(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),Qm=d(st),ks=s(st,"P",{});var Cl=r(ks);Bm=i(Cl,"This model is also a "),vs=s(Cl,"A",{href:!0,rel:!0});var c_=r(vs);Hm=i(c_,"tf.keras.Model"),c_.forEach(t),Rm=i(Cl,` 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.`),Cl.forEach(t),Um=d(st),b(Co.$$.fragment,st),Vm=d(st),Ke=s(st,"DIV",{class:!0});var Pt=r(Ke);b(Ts.$$.fragment,Pt),Km=d(Pt),Gt=s(Pt,"P",{});var zr=r(Gt);Xm=i(zr,"The "),hr=s(zr,"A",{href:!0});var p_=r(hr);Jm=i(p_,"TFMPNetForMultipleChoice"),p_.forEach(t),Gm=i(zr," forward method, overrides the "),Qa=s(zr,"CODE",{});var h_=r(Qa);Ym=i(h_,"__call__"),h_.forEach(t),Zm=i(zr," special method."),zr.forEach(t),eu=d(Pt),b(jo.$$.fragment,Pt),tu=d(Pt),Ba=s(Pt,"P",{});var m_=r(Ba);ou=i(m_,"Example:"),m_.forEach(t),nu=d(Pt),b(Ms.$$.fragment,Pt),Pt.forEach(t),st.forEach(t),Oi=d(o),Yt=s(o,"H2",{class:!0});var jl=r(Yt);xo=s(jl,"A",{id:!0,class:!0,href:!0});var u_=r(xo);Ha=s(u_,"SPAN",{});var f_=r(Ha);b(bs.$$.fragment,f_),f_.forEach(t),u_.forEach(t),su=d(jl),Ra=s(jl,"SPAN",{});var g_=r(Ra);ru=i(g_,"TFMPNetForTokenClassification"),g_.forEach(t),jl.forEach(t),Wi=d(o),qe=s(o,"DIV",{class:!0});var rt=r(qe);b(ws.$$.fragment,rt),au=d(rt),Ua=s(rt,"P",{});var __=r(Ua);iu=i(__,`MPNet 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.`),__.forEach(t),lu=d(rt),Ps=s(rt,"P",{});var xl=r(Ps);du=i(xl,"This model inherits from "),mr=s(xl,"A",{href:!0});var k_=r(mr);cu=i(k_,"TFPreTrainedModel"),k_.forEach(t),pu=i(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),hu=d(rt),Ns=s(rt,"P",{});var Ll=r(Ns);mu=i(Ll,"This model is also a "),$s=s(Ll,"A",{href:!0,rel:!0});var v_=r($s);uu=i(v_,"tf.keras.Model"),v_.forEach(t),fu=i(Ll,` 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.`),Ll.forEach(t),gu=d(rt),b(Lo.$$.fragment,rt),_u=d(rt),Xe=s(rt,"DIV",{class:!0});var Nt=r(Xe);b(ys.$$.fragment,Nt),ku=d(Nt),Zt=s(Nt,"P",{});var Er=r(Zt);vu=i(Er,"The "),ur=s(Er,"A",{href:!0});var T_=r(ur);Tu=i(T_,"TFMPNetForTokenClassification"),T_.forEach(t),Mu=i(Er," forward method, overrides the "),Va=s(Er,"CODE",{});var M_=r(Va);bu=i(M_,"__call__"),M_.forEach(t),wu=i(Er," special method."),Er.forEach(t),Pu=d(Nt),b(Ao.$$.fragment,Nt),Nu=d(Nt),Ka=s(Nt,"P",{});var b_=r(Ka);$u=i(b_,"Example:"),b_.forEach(t),yu=d(Nt),b(Fs.$$.fragment,Nt),Nt.forEach(t),rt.forEach(t),Qi=d(o),eo=s(o,"H2",{class:!0});var Al=r(eo);Io=s(Al,"A",{id:!0,class:!0,href:!0});var w_=r(Io);Xa=s(w_,"SPAN",{});var P_=r(Xa);b(zs.$$.fragment,P_),P_.forEach(t),w_.forEach(t),Fu=d(Al),Ja=s(Al,"SPAN",{});var N_=r(Ja);zu=i(N_,"TFMPNetForQuestionAnswering"),N_.forEach(t),Al.forEach(t),Bi=d(o),Ce=s(o,"DIV",{class:!0});var at=r(Ce);b(Es.$$.fragment,at),Eu=d(at),to=s(at,"P",{});var qr=r(to);qu=i(qr,`MPNet 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 `),Ga=s(qr,"CODE",{});var $_=r(Ga);Cu=i($_,"span start logits"),$_.forEach(t),ju=i(qr," and "),Ya=s(qr,"CODE",{});var y_=r(Ya);xu=i(y_,"span end logits"),y_.forEach(t),Lu=i(qr,")."),qr.forEach(t),Au=d(at),qs=s(at,"P",{});var Il=r(qs);Iu=i(Il,"This model inherits from "),fr=s(Il,"A",{href:!0});var F_=r(fr);Du=i(F_,"TFPreTrainedModel"),F_.forEach(t),Su=i(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),Ou=d(at),Cs=s(at,"P",{});var Dl=r(Cs);Wu=i(Dl,"This model is also a "),js=s(Dl,"A",{href:!0,rel:!0});var z_=r(js);Qu=i(z_,"tf.keras.Model"),z_.forEach(t),Bu=i(Dl,` 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.`),Dl.forEach(t),Hu=d(at),b(Do.$$.fragment,at),Ru=d(at),Je=s(at,"DIV",{class:!0});var $t=r(Je);b(xs.$$.fragment,$t),Uu=d($t),oo=s($t,"P",{});var Cr=r(oo);Vu=i(Cr,"The "),gr=s(Cr,"A",{href:!0});var E_=r(gr);Ku=i(E_,"TFMPNetForQuestionAnswering"),E_.forEach(t),Xu=i(Cr," forward method, overrides the "),Za=s(Cr,"CODE",{});var q_=r(Za);Ju=i(q_,"__call__"),q_.forEach(t),Gu=i(Cr," special method."),Cr.forEach(t),Yu=d($t),b(So.$$.fragment,$t),Zu=d($t),ei=s($t,"P",{});var C_=r(ei);ef=i(C_,"Example:"),C_.forEach(t),tf=d($t),b(Ls.$$.fragment,$t),$t.forEach(t),at.forEach(t),this.h()},h(){h(p,"name","hf:doc:metadata"),h(p,"content",JSON.stringify(ok)),h(g,"id","mpnet"),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","#mpnet"),h(f,"class","relative group"),h(X,"id","overview"),h(X,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(X,"href","#overview"),h(z,"class","relative group"),h(Y,"href","https://arxiv.org/abs/2004.09297"),h(Y,"rel","nofollow"),h(ge,"href","https://github.com/microsoft/MPNet"),h(ge,"rel","nofollow"),h(no,"id","transformers.MPNetConfig"),h(no,"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(no,"href","#transformers.MPNetConfig"),h(fe,"class","relative group"),h(Ss,"href","/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.MPNetModel"),h(Os,"href","/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.TFMPNetModel"),h(Ho,"href","https://huggingface.co/mpnet-base"),h(Ho,"rel","nofollow"),h(Ws,"href","/docs/transformers/pr_15839/en/main_classes/configuration#transformers.PretrainedConfig"),h(Qs,"href","/docs/transformers/pr_15839/en/main_classes/configuration#transformers.PretrainedConfig"),h(xe,"class","docstring"),h(so,"id","transformers.MPNetTokenizer"),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.MPNetTokenizer"),h(Ft,"class","relative group"),h(Bs,"href","/docs/transformers/pr_15839/en/model_doc/bert#transformers.BertTokenizer"),h(dt,"class","docstring"),h(ro,"class","docstring"),h(ao,"class","docstring"),h(Us,"class","docstring"),h($e,"class","docstring"),h(io,"id","transformers.MPNetTokenizerFast"),h(io,"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(io,"href","#transformers.MPNetTokenizerFast"),h(zt,"class","relative group"),h(Vs,"href","/docs/transformers/pr_15839/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),h(lo,"class","docstring"),h(Ze,"class","docstring"),h(co,"id","transformers.MPNetModel"),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.MPNetModel"),h(Et,"class","relative group"),h(Ks,"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(Xs,"href","/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.MPNetModel"),h(Oe,"class","docstring"),h(Le,"class","docstring"),h(ho,"id","transformers.MPNetForMaskedLM"),h(ho,"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(ho,"href","#transformers.MPNetForMaskedLM"),h(Ct,"class","relative group"),h(Js,"href","/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.MPNetForMaskedLM"),h(We,"class","docstring"),h(jt,"class","docstring"),h(uo,"id","transformers.MPNetForSequenceClassification"),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.MPNetForSequenceClassification"),h(Lt,"class","relative group"),h(Gs,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel"),h(bn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(bn,"rel","nofollow"),h(Ys,"href","/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.MPNetForSequenceClassification"),h(Pe,"class","docstring"),h(Ae,"class","docstring"),h(go,"id","transformers.MPNetForMultipleChoice"),h(go,"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(go,"href","#transformers.MPNetForMultipleChoice"),h(It,"class","relative group"),h(Zs,"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(er,"href","/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.MPNetForMultipleChoice"),h(Qe,"class","docstring"),h(Ie,"class","docstring"),h(ko,"id","transformers.MPNetForTokenClassification"),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.MPNetForTokenClassification"),h(St,"class","relative group"),h(tr,"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(or,"href","/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.MPNetForTokenClassification"),h(Be,"class","docstring"),h(De,"class","docstring"),h(To,"id","transformers.MPNetForQuestionAnswering"),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.MPNetForQuestionAnswering"),h(Wt,"class","relative group"),h(nr,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.PreTrainedModel"),h(Hn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Hn,"rel","nofollow"),h(sr,"href","/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.MPNetForQuestionAnswering"),h(He,"class","docstring"),h(Se,"class","docstring"),h(bo,"id","transformers.TFMPNetModel"),h(bo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(bo,"href","#transformers.TFMPNetModel"),h(Ht,"class","relative group"),h(rr,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),h(Gn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(Gn,"rel","nofollow"),h(ar,"href","/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.TFMPNetModel"),h(Re,"class","docstring"),h(ye,"class","docstring"),h(No,"id","transformers.TFMPNetForMaskedLM"),h(No,"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(No,"href","#transformers.TFMPNetForMaskedLM"),h(Ut,"class","relative group"),h(ir,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),h(rs,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(rs,"rel","nofollow"),h(lr,"href","/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.TFMPNetForMaskedLM"),h(Ue,"class","docstring"),h(Fe,"class","docstring"),h(Fo,"id","transformers.TFMPNetForSequenceClassification"),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.TFMPNetForSequenceClassification"),h(Kt,"class","relative group"),h(dr,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),h(hs,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(hs,"rel","nofollow"),h(cr,"href","/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.TFMPNetForSequenceClassification"),h(Ve,"class","docstring"),h(ze,"class","docstring"),h(qo,"id","transformers.TFMPNetForMultipleChoice"),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.TFMPNetForMultipleChoice"),h(Jt,"class","relative group"),h(pr,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),h(vs,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(vs,"rel","nofollow"),h(hr,"href","/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.TFMPNetForMultipleChoice"),h(Ke,"class","docstring"),h(Ee,"class","docstring"),h(xo,"id","transformers.TFMPNetForTokenClassification"),h(xo,"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(xo,"href","#transformers.TFMPNetForTokenClassification"),h(Yt,"class","relative group"),h(mr,"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(ur,"href","/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.TFMPNetForTokenClassification"),h(Xe,"class","docstring"),h(qe,"class","docstring"),h(Io,"id","transformers.TFMPNetForQuestionAnswering"),h(Io,"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(Io,"href","#transformers.TFMPNetForQuestionAnswering"),h(eo,"class","relative group"),h(fr,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.TFPreTrainedModel"),h(js,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(js,"rel","nofollow"),h(gr,"href","/docs/transformers/pr_15839/en/model_doc/mpnet#transformers.TFMPNetForQuestionAnswering"),h(Je,"class","docstring"),h(Ce,"class","docstring")},m(o,u){e(document.head,p),m(o,y,u),m(o,f,u),e(f,g),e(g,v),w(k,v,null),e(f,_),e(f,F),e(F,le),m(o,U,u),m(o,z,u),e(z,X),e(X,S),w(G,S,null),e(z,de),e(z,O),e(O,ce),m(o,se,u),m(o,R,u),e(R,A),e(R,Y),e(Y,V),e(R,E),m(o,q,u),m(o,Z,u),e(Z,B),m(o,re,u),m(o,ee,u),e(ee,H),m(o,ae,u),m(o,te,u),e(te,C),e(C,pe),m(o,W,u),m(o,oe,u),e(oe,he),m(o,x,u),m(o,ne,u),e(ne,j),e(j,me),e(j,c),e(c,T),e(j,K),e(j,_e),e(_e,ve),e(j,I),e(j,ke),e(ke,Te),e(j,Me),m(o,L,u),m(o,D,u),e(D,be),e(D,ge),e(ge,ue),e(D,we),m(o,ie,u),m(o,fe,u),e(fe,no),e(no,jr),w(Qo,jr,null),e(fe,Sl),e(fe,xr),e(xr,Ol),m(o,fi,u),m(o,xe,u),w(Bo,xe,null),e(xe,Wl),e(xe,it),e(it,Ql),e(it,Ss),e(Ss,Bl),e(it,Hl),e(it,Os),e(Os,Rl),e(it,Ul),e(it,Ho),e(Ho,Vl),e(it,Kl),e(xe,Xl),e(xe,yt),e(yt,Jl),e(yt,Ws),e(Ws,Gl),e(yt,Yl),e(yt,Qs),e(Qs,Zl),e(yt,ed),e(xe,td),e(xe,Lr),e(Lr,od),e(xe,nd),w(Ro,xe,null),m(o,gi,u),m(o,Ft,u),e(Ft,so),e(so,Ar),w(Uo,Ar,null),e(Ft,sd),e(Ft,Ir),e(Ir,rd),m(o,_i,u),m(o,$e,u),w(Vo,$e,null),e($e,ad),e($e,Ko),e(Ko,id),e(Ko,Bs),e(Bs,ld),e(Ko,dd),e($e,cd),e($e,dt),w(Xo,dt,null),e(dt,pd),e(dt,Dr),e(Dr,hd),e(dt,md),e(dt,Jo),e(Jo,Hs),e(Hs,ud),e(Hs,Sr),e(Sr,fd),e(Jo,gd),e(Jo,Rs),e(Rs,_d),e(Rs,Or),e(Or,kd),e($e,vd),e($e,ro),w(Go,ro,null),e(ro,Td),e(ro,Yo),e(Yo,Md),e(Yo,Wr),e(Wr,bd),e(Yo,wd),e($e,Pd),e($e,ao),w(Zo,ao,null),e(ao,Nd),e(ao,Qr),e(Qr,$d),e($e,yd),e($e,Us),w(en,Us,null),m(o,ki,u),m(o,zt,u),e(zt,io),e(io,Br),w(tn,Br,null),e(zt,Fd),e(zt,Hr),e(Hr,zd),m(o,vi,u),m(o,Ze,u),w(on,Ze,null),e(Ze,Ed),e(Ze,nn),e(nn,qd),e(nn,Rr),e(Rr,Cd),e(nn,jd),e(Ze,xd),e(Ze,sn),e(sn,Ld),e(sn,Vs),e(Vs,Ad),e(sn,Id),e(Ze,Dd),e(Ze,lo),w(rn,lo,null),e(lo,Sd),e(lo,Ur),e(Ur,Od),m(o,Ti,u),m(o,Et,u),e(Et,co),e(co,Vr),w(an,Vr,null),e(Et,Wd),e(Et,Kr),e(Kr,Qd),m(o,Mi,u),m(o,Le,u),w(ln,Le,null),e(Le,Bd),e(Le,Xr),e(Xr,Hd),e(Le,Rd),e(Le,dn),e(dn,Ud),e(dn,Ks),e(Ks,Vd),e(dn,Kd),e(Le,Xd),e(Le,cn),e(cn,Jd),e(cn,pn),e(pn,Gd),e(cn,Yd),e(Le,Zd),e(Le,Oe),w(hn,Oe,null),e(Oe,ec),e(Oe,qt),e(qt,tc),e(qt,Xs),e(Xs,oc),e(qt,nc),e(qt,Jr),e(Jr,sc),e(qt,rc),e(Oe,ac),w(po,Oe,null),e(Oe,ic),e(Oe,Gr),e(Gr,lc),e(Oe,dc),w(mn,Oe,null),m(o,bi,u),m(o,Ct,u),e(Ct,ho),e(ho,Yr),w(un,Yr,null),e(Ct,cc),e(Ct,Zr),e(Zr,pc),m(o,wi,u),m(o,jt,u),w(fn,jt,null),e(jt,hc),e(jt,We),w(gn,We,null),e(We,mc),e(We,xt),e(xt,uc),e(xt,Js),e(Js,fc),e(xt,gc),e(xt,ea),e(ea,_c),e(xt,kc),e(We,vc),w(mo,We,null),e(We,Tc),e(We,ta),e(ta,Mc),e(We,bc),w(_n,We,null),m(o,Pi,u),m(o,Lt,u),e(Lt,uo),e(uo,oa),w(kn,oa,null),e(Lt,wc),e(Lt,na),e(na,Pc),m(o,Ni,u),m(o,Ae,u),w(vn,Ae,null),e(Ae,Nc),e(Ae,sa),e(sa,$c),e(Ae,yc),e(Ae,Tn),e(Tn,Fc),e(Tn,Gs),e(Gs,zc),e(Tn,Ec),e(Ae,qc),e(Ae,Mn),e(Mn,Cc),e(Mn,bn),e(bn,jc),e(Mn,xc),e(Ae,Lc),e(Ae,Pe),w(wn,Pe,null),e(Pe,Ac),e(Pe,At),e(At,Ic),e(At,Ys),e(Ys,Dc),e(At,Sc),e(At,ra),e(ra,Oc),e(At,Wc),e(Pe,Qc),w(fo,Pe,null),e(Pe,Bc),e(Pe,aa),e(aa,Hc),e(Pe,Rc),w(Pn,Pe,null),e(Pe,Uc),e(Pe,ia),e(ia,Vc),e(Pe,Kc),w(Nn,Pe,null),m(o,$i,u),m(o,It,u),e(It,go),e(go,la),w($n,la,null),e(It,Xc),e(It,da),e(da,Jc),m(o,yi,u),m(o,Ie,u),w(yn,Ie,null),e(Ie,Gc),e(Ie,ca),e(ca,Yc),e(Ie,Zc),e(Ie,Fn),e(Fn,ep),e(Fn,Zs),e(Zs,tp),e(Fn,op),e(Ie,np),e(Ie,zn),e(zn,sp),e(zn,En),e(En,rp),e(zn,ap),e(Ie,ip),e(Ie,Qe),w(qn,Qe,null),e(Qe,lp),e(Qe,Dt),e(Dt,dp),e(Dt,er),e(er,cp),e(Dt,pp),e(Dt,pa),e(pa,hp),e(Dt,mp),e(Qe,up),w(_o,Qe,null),e(Qe,fp),e(Qe,ha),e(ha,gp),e(Qe,_p),w(Cn,Qe,null),m(o,Fi,u),m(o,St,u),e(St,ko),e(ko,ma),w(jn,ma,null),e(St,kp),e(St,ua),e(ua,vp),m(o,zi,u),m(o,De,u),w(xn,De,null),e(De,Tp),e(De,fa),e(fa,Mp),e(De,bp),e(De,Ln),e(Ln,wp),e(Ln,tr),e(tr,Pp),e(Ln,Np),e(De,$p),e(De,An),e(An,yp),e(An,In),e(In,Fp),e(An,zp),e(De,Ep),e(De,Be),w(Dn,Be,null),e(Be,qp),e(Be,Ot),e(Ot,Cp),e(Ot,or),e(or,jp),e(Ot,xp),e(Ot,ga),e(ga,Lp),e(Ot,Ap),e(Be,Ip),w(vo,Be,null),e(Be,Dp),e(Be,_a),e(_a,Sp),e(Be,Op),w(Sn,Be,null),m(o,Ei,u),m(o,Wt,u),e(Wt,To),e(To,ka),w(On,ka,null),e(Wt,Wp),e(Wt,va),e(va,Qp),m(o,qi,u),m(o,Se,u),w(Wn,Se,null),e(Se,Bp),e(Se,Qt),e(Qt,Hp),e(Qt,Ta),e(Ta,Rp),e(Qt,Up),e(Qt,Ma),e(Ma,Vp),e(Qt,Kp),e(Se,Xp),e(Se,Qn),e(Qn,Jp),e(Qn,nr),e(nr,Gp),e(Qn,Yp),e(Se,Zp),e(Se,Bn),e(Bn,eh),e(Bn,Hn),e(Hn,th),e(Bn,oh),e(Se,nh),e(Se,He),w(Rn,He,null),e(He,sh),e(He,Bt),e(Bt,rh),e(Bt,sr),e(sr,ah),e(Bt,ih),e(Bt,ba),e(ba,lh),e(Bt,dh),e(He,ch),w(Mo,He,null),e(He,ph),e(He,wa),e(wa,hh),e(He,mh),w(Un,He,null),m(o,Ci,u),m(o,Ht,u),e(Ht,bo),e(bo,Pa),w(Vn,Pa,null),e(Ht,uh),e(Ht,Na),e(Na,fh),m(o,ji,u),m(o,ye,u),w(Kn,ye,null),e(ye,gh),e(ye,$a),e($a,_h),e(ye,kh),e(ye,Xn),e(Xn,vh),e(Xn,rr),e(rr,Th),e(Xn,Mh),e(ye,bh),e(ye,Jn),e(Jn,wh),e(Jn,Gn),e(Gn,Ph),e(Jn,Nh),e(ye,$h),w(wo,ye,null),e(ye,yh),e(ye,Re),w(Yn,Re,null),e(Re,Fh),e(Re,Rt),e(Rt,zh),e(Rt,ar),e(ar,Eh),e(Rt,qh),e(Rt,ya),e(ya,Ch),e(Rt,jh),e(Re,xh),w(Po,Re,null),e(Re,Lh),e(Re,Fa),e(Fa,Ah),e(Re,Ih),w(Zn,Re,null),m(o,xi,u),m(o,Ut,u),e(Ut,No),e(No,za),w(es,za,null),e(Ut,Dh),e(Ut,Ea),e(Ea,Sh),m(o,Li,u),m(o,Fe,u),w(ts,Fe,null),e(Fe,Oh),e(Fe,os),e(os,Wh),e(os,qa),e(qa,Qh),e(os,Bh),e(Fe,Hh),e(Fe,ns),e(ns,Rh),e(ns,ir),e(ir,Uh),e(ns,Vh),e(Fe,Kh),e(Fe,ss),e(ss,Xh),e(ss,rs),e(rs,Jh),e(ss,Gh),e(Fe,Yh),w($o,Fe,null),e(Fe,Zh),e(Fe,Ue),w(as,Ue,null),e(Ue,em),e(Ue,Vt),e(Vt,tm),e(Vt,lr),e(lr,om),e(Vt,nm),e(Vt,Ca),e(Ca,sm),e(Vt,rm),e(Ue,am),w(yo,Ue,null),e(Ue,im),e(Ue,ja),e(ja,lm),e(Ue,dm),w(is,Ue,null),m(o,Ai,u),m(o,Kt,u),e(Kt,Fo),e(Fo,xa),w(ls,xa,null),e(Kt,cm),e(Kt,La),e(La,pm),m(o,Ii,u),m(o,ze,u),w(ds,ze,null),e(ze,hm),e(ze,Aa),e(Aa,mm),e(ze,um),e(ze,cs),e(cs,fm),e(cs,dr),e(dr,gm),e(cs,_m),e(ze,km),e(ze,ps),e(ps,vm),e(ps,hs),e(hs,Tm),e(ps,Mm),e(ze,bm),w(zo,ze,null),e(ze,wm),e(ze,Ve),w(ms,Ve,null),e(Ve,Pm),e(Ve,Xt),e(Xt,Nm),e(Xt,cr),e(cr,$m),e(Xt,ym),e(Xt,Ia),e(Ia,Fm),e(Xt,zm),e(Ve,Em),w(Eo,Ve,null),e(Ve,qm),e(Ve,Da),e(Da,Cm),e(Ve,jm),w(us,Ve,null),m(o,Di,u),m(o,Jt,u),e(Jt,qo),e(qo,Sa),w(fs,Sa,null),e(Jt,xm),e(Jt,Oa),e(Oa,Lm),m(o,Si,u),m(o,Ee,u),w(gs,Ee,null),e(Ee,Am),e(Ee,Wa),e(Wa,Im),e(Ee,Dm),e(Ee,_s),e(_s,Sm),e(_s,pr),e(pr,Om),e(_s,Wm),e(Ee,Qm),e(Ee,ks),e(ks,Bm),e(ks,vs),e(vs,Hm),e(ks,Rm),e(Ee,Um),w(Co,Ee,null),e(Ee,Vm),e(Ee,Ke),w(Ts,Ke,null),e(Ke,Km),e(Ke,Gt),e(Gt,Xm),e(Gt,hr),e(hr,Jm),e(Gt,Gm),e(Gt,Qa),e(Qa,Ym),e(Gt,Zm),e(Ke,eu),w(jo,Ke,null),e(Ke,tu),e(Ke,Ba),e(Ba,ou),e(Ke,nu),w(Ms,Ke,null),m(o,Oi,u),m(o,Yt,u),e(Yt,xo),e(xo,Ha),w(bs,Ha,null),e(Yt,su),e(Yt,Ra),e(Ra,ru),m(o,Wi,u),m(o,qe,u),w(ws,qe,null),e(qe,au),e(qe,Ua),e(Ua,iu),e(qe,lu),e(qe,Ps),e(Ps,du),e(Ps,mr),e(mr,cu),e(Ps,pu),e(qe,hu),e(qe,Ns),e(Ns,mu),e(Ns,$s),e($s,uu),e(Ns,fu),e(qe,gu),w(Lo,qe,null),e(qe,_u),e(qe,Xe),w(ys,Xe,null),e(Xe,ku),e(Xe,Zt),e(Zt,vu),e(Zt,ur),e(ur,Tu),e(Zt,Mu),e(Zt,Va),e(Va,bu),e(Zt,wu),e(Xe,Pu),w(Ao,Xe,null),e(Xe,Nu),e(Xe,Ka),e(Ka,$u),e(Xe,yu),w(Fs,Xe,null),m(o,Qi,u),m(o,eo,u),e(eo,Io),e(Io,Xa),w(zs,Xa,null),e(eo,Fu),e(eo,Ja),e(Ja,zu),m(o,Bi,u),m(o,Ce,u),w(Es,Ce,null),e(Ce,Eu),e(Ce,to),e(to,qu),e(to,Ga),e(Ga,Cu),e(to,ju),e(to,Ya),e(Ya,xu),e(to,Lu),e(Ce,Au),e(Ce,qs),e(qs,Iu),e(qs,fr),e(fr,Du),e(qs,Su),e(Ce,Ou),e(Ce,Cs),e(Cs,Wu),e(Cs,js),e(js,Qu),e(Cs,Bu),e(Ce,Hu),w(Do,Ce,null),e(Ce,Ru),e(Ce,Je),w(xs,Je,null),e(Je,Uu),e(Je,oo),e(oo,Vu),e(oo,gr),e(gr,Ku),e(oo,Xu),e(oo,Za),e(Za,Ju),e(oo,Gu),e(Je,Yu),w(So,Je,null),e(Je,Zu),e(Je,ei),e(ei,ef),e(Je,tf),w(Ls,Je,null),Hi=!0},p(o,[u]){const As={};u&2&&(As.$$scope={dirty:u,ctx:o}),po.$set(As);const ti={};u&2&&(ti.$$scope={dirty:u,ctx:o}),mo.$set(ti);const oi={};u&2&&(oi.$$scope={dirty:u,ctx:o}),fo.$set(oi);const ni={};u&2&&(ni.$$scope={dirty:u,ctx:o}),_o.$set(ni);const Is={};u&2&&(Is.$$scope={dirty:u,ctx:o}),vo.$set(Is);const si={};u&2&&(si.$$scope={dirty:u,ctx:o}),Mo.$set(si);const ri={};u&2&&(ri.$$scope={dirty:u,ctx:o}),wo.$set(ri);const ai={};u&2&&(ai.$$scope={dirty:u,ctx:o}),Po.$set(ai);const Ds={};u&2&&(Ds.$$scope={dirty:u,ctx:o}),$o.$set(Ds);const ii={};u&2&&(ii.$$scope={dirty:u,ctx:o}),yo.$set(ii);const li={};u&2&&(li.$$scope={dirty:u,ctx:o}),zo.$set(li);const di={};u&2&&(di.$$scope={dirty:u,ctx:o}),Eo.$set(di);const ci={};u&2&&(ci.$$scope={dirty:u,ctx:o}),Co.$set(ci);const pi={};u&2&&(pi.$$scope={dirty:u,ctx:o}),jo.$set(pi);const hi={};u&2&&(hi.$$scope={dirty:u,ctx:o}),Lo.$set(hi);const mi={};u&2&&(mi.$$scope={dirty:u,ctx:o}),Ao.$set(mi);const lt={};u&2&&(lt.$$scope={dirty:u,ctx:o}),Do.$set(lt);const ui={};u&2&&(ui.$$scope={dirty:u,ctx:o}),So.$set(ui)},i(o){Hi||(P(k.$$.fragment,o),P(G.$$.fragment,o),P(Qo.$$.fragment,o),P(Bo.$$.fragment,o),P(Ro.$$.fragment,o),P(Uo.$$.fragment,o),P(Vo.$$.fragment,o),P(Xo.$$.fragment,o),P(Go.$$.fragment,o),P(Zo.$$.fragment,o),P(en.$$.fragment,o),P(tn.$$.fragment,o),P(on.$$.fragment,o),P(rn.$$.fragment,o),P(an.$$.fragment,o),P(ln.$$.fragment,o),P(hn.$$.fragment,o),P(po.$$.fragment,o),P(mn.$$.fragment,o),P(un.$$.fragment,o),P(fn.$$.fragment,o),P(gn.$$.fragment,o),P(mo.$$.fragment,o),P(_n.$$.fragment,o),P(kn.$$.fragment,o),P(vn.$$.fragment,o),P(wn.$$.fragment,o),P(fo.$$.fragment,o),P(Pn.$$.fragment,o),P(Nn.$$.fragment,o),P($n.$$.fragment,o),P(yn.$$.fragment,o),P(qn.$$.fragment,o),P(_o.$$.fragment,o),P(Cn.$$.fragment,o),P(jn.$$.fragment,o),P(xn.$$.fragment,o),P(Dn.$$.fragment,o),P(vo.$$.fragment,o),P(Sn.$$.fragment,o),P(On.$$.fragment,o),P(Wn.$$.fragment,o),P(Rn.$$.fragment,o),P(Mo.$$.fragment,o),P(Un.$$.fragment,o),P(Vn.$$.fragment,o),P(Kn.$$.fragment,o),P(wo.$$.fragment,o),P(Yn.$$.fragment,o),P(Po.$$.fragment,o),P(Zn.$$.fragment,o),P(es.$$.fragment,o),P(ts.$$.fragment,o),P($o.$$.fragment,o),P(as.$$.fragment,o),P(yo.$$.fragment,o),P(is.$$.fragment,o),P(ls.$$.fragment,o),P(ds.$$.fragment,o),P(zo.$$.fragment,o),P(ms.$$.fragment,o),P(Eo.$$.fragment,o),P(us.$$.fragment,o),P(fs.$$.fragment,o),P(gs.$$.fragment,o),P(Co.$$.fragment,o),P(Ts.$$.fragment,o),P(jo.$$.fragment,o),P(Ms.$$.fragment,o),P(bs.$$.fragment,o),P(ws.$$.fragment,o),P(Lo.$$.fragment,o),P(ys.$$.fragment,o),P(Ao.$$.fragment,o),P(Fs.$$.fragment,o),P(zs.$$.fragment,o),P(Es.$$.fragment,o),P(Do.$$.fragment,o),P(xs.$$.fragment,o),P(So.$$.fragment,o),P(Ls.$$.fragment,o),Hi=!0)},o(o){N(k.$$.fragment,o),N(G.$$.fragment,o),N(Qo.$$.fragment,o),N(Bo.$$.fragment,o),N(Ro.$$.fragment,o),N(Uo.$$.fragment,o),N(Vo.$$.fragment,o),N(Xo.$$.fragment,o),N(Go.$$.fragment,o),N(Zo.$$.fragment,o),N(en.$$.fragment,o),N(tn.$$.fragment,o),N(on.$$.fragment,o),N(rn.$$.fragment,o),N(an.$$.fragment,o),N(ln.$$.fragment,o),N(hn.$$.fragment,o),N(po.$$.fragment,o),N(mn.$$.fragment,o),N(un.$$.fragment,o),N(fn.$$.fragment,o),N(gn.$$.fragment,o),N(mo.$$.fragment,o),N(_n.$$.fragment,o),N(kn.$$.fragment,o),N(vn.$$.fragment,o),N(wn.$$.fragment,o),N(fo.$$.fragment,o),N(Pn.$$.fragment,o),N(Nn.$$.fragment,o),N($n.$$.fragment,o),N(yn.$$.fragment,o),N(qn.$$.fragment,o),N(_o.$$.fragment,o),N(Cn.$$.fragment,o),N(jn.$$.fragment,o),N(xn.$$.fragment,o),N(Dn.$$.fragment,o),N(vo.$$.fragment,o),N(Sn.$$.fragment,o),N(On.$$.fragment,o),N(Wn.$$.fragment,o),N(Rn.$$.fragment,o),N(Mo.$$.fragment,o),N(Un.$$.fragment,o),N(Vn.$$.fragment,o),N(Kn.$$.fragment,o),N(wo.$$.fragment,o),N(Yn.$$.fragment,o),N(Po.$$.fragment,o),N(Zn.$$.fragment,o),N(es.$$.fragment,o),N(ts.$$.fragment,o),N($o.$$.fragment,o),N(as.$$.fragment,o),N(yo.$$.fragment,o),N(is.$$.fragment,o),N(ls.$$.fragment,o),N(ds.$$.fragment,o),N(zo.$$.fragment,o),N(ms.$$.fragment,o),N(Eo.$$.fragment,o),N(us.$$.fragment,o),N(fs.$$.fragment,o),N(gs.$$.fragment,o),N(Co.$$.fragment,o),N(Ts.$$.fragment,o),N(jo.$$.fragment,o),N(Ms.$$.fragment,o),N(bs.$$.fragment,o),N(ws.$$.fragment,o),N(Lo.$$.fragment,o),N(ys.$$.fragment,o),N(Ao.$$.fragment,o),N(Fs.$$.fragment,o),N(zs.$$.fragment,o),N(Es.$$.fragment,o),N(Do.$$.fragment,o),N(xs.$$.fragment,o),N(So.$$.fragment,o),N(Ls.$$.fragment,o),Hi=!1},d(o){t(p),o&&t(y),o&&t(f),$(k),o&&t(U),o&&t(z),$(G),o&&t(se),o&&t(R),o&&t(q),o&&t(Z),o&&t(re),o&&t(ee),o&&t(ae),o&&t(te),o&&t(W),o&&t(oe),o&&t(x),o&&t(ne),o&&t(L),o&&t(D),o&&t(ie),o&&t(fe),$(Qo),o&&t(fi),o&&t(xe),$(Bo),$(Ro),o&&t(gi),o&&t(Ft),$(Uo),o&&t(_i),o&&t($e),$(Vo),$(Xo),$(Go),$(Zo),$(en),o&&t(ki),o&&t(zt),$(tn),o&&t(vi),o&&t(Ze),$(on),$(rn),o&&t(Ti),o&&t(Et),$(an),o&&t(Mi),o&&t(Le),$(ln),$(hn),$(po),$(mn),o&&t(bi),o&&t(Ct),$(un),o&&t(wi),o&&t(jt),$(fn),$(gn),$(mo),$(_n),o&&t(Pi),o&&t(Lt),$(kn),o&&t(Ni),o&&t(Ae),$(vn),$(wn),$(fo),$(Pn),$(Nn),o&&t($i),o&&t(It),$($n),o&&t(yi),o&&t(Ie),$(yn),$(qn),$(_o),$(Cn),o&&t(Fi),o&&t(St),$(jn),o&&t(zi),o&&t(De),$(xn),$(Dn),$(vo),$(Sn),o&&t(Ei),o&&t(Wt),$(On),o&&t(qi),o&&t(Se),$(Wn),$(Rn),$(Mo),$(Un),o&&t(Ci),o&&t(Ht),$(Vn),o&&t(ji),o&&t(ye),$(Kn),$(wo),$(Yn),$(Po),$(Zn),o&&t(xi),o&&t(Ut),$(es),o&&t(Li),o&&t(Fe),$(ts),$($o),$(as),$(yo),$(is),o&&t(Ai),o&&t(Kt),$(ls),o&&t(Ii),o&&t(ze),$(ds),$(zo),$(ms),$(Eo),$(us),o&&t(Di),o&&t(Jt),$(fs),o&&t(Si),o&&t(Ee),$(gs),$(Co),$(Ts),$(jo),$(Ms),o&&t(Oi),o&&t(Yt),$(bs),o&&t(Wi),o&&t(qe),$(ws),$(Lo),$(ys),$(Ao),$(Fs),o&&t(Qi),o&&t(eo),$(zs),o&&t(Bi),o&&t(Ce),$(Es),$(Do),$(xs),$(So),$(Ls)}}}const ok={local:"mpnet",sections:[{local:"overview",title:"Overview"},{local:"transformers.MPNetConfig",title:"MPNetConfig"},{local:"transformers.MPNetTokenizer",title:"MPNetTokenizer"},{local:"transformers.MPNetTokenizerFast",title:"MPNetTokenizerFast"},{local:"transformers.MPNetModel",title:"MPNetModel"},{local:"transformers.MPNetForMaskedLM",title:"MPNetForMaskedLM"},{local:"transformers.MPNetForSequenceClassification",title:"MPNetForSequenceClassification"},{local:"transformers.MPNetForMultipleChoice",title:"MPNetForMultipleChoice"},{local:"transformers.MPNetForTokenClassification",title:"MPNetForTokenClassification"},{local:"transformers.MPNetForQuestionAnswering",title:"MPNetForQuestionAnswering"},{local:"transformers.TFMPNetModel",title:"TFMPNetModel"},{local:"transformers.TFMPNetForMaskedLM",title:"TFMPNetForMaskedLM"},{local:"transformers.TFMPNetForSequenceClassification",title:"TFMPNetForSequenceClassification"},{local:"transformers.TFMPNetForMultipleChoice",title:"TFMPNetForMultipleChoice"},{local:"transformers.TFMPNetForTokenClassification",title:"TFMPNetForTokenClassification"},{local:"transformers.TFMPNetForQuestionAnswering",title:"TFMPNetForQuestionAnswering"}],title:"MPNet"};function nk(Q,p,y){let{fw:f}=p;return Q.$$set=g=>{"fw"in g&&y(0,f=g.fw)},[f]}class ck extends j_{constructor(p){super();x_(this,p,nk,tk,L_,{fw:0})}}export{ck as default,ok as metadata};
