import{S as lh,i as ch,s as ph,e as n,k as c,w as b,t as r,M as hh,c as s,d as o,m as p,a,x as y,h as i,b as m,G as e,g as v,y as k,q as M,o as w,B as T,v as mh,L as oe}from"../../chunks/vendor-hf-doc-builder.js";import{T as rn}from"../../chunks/Tip-hf-doc-builder.js";import{D as E}from"../../chunks/Docstring-hf-doc-builder.js";import{C as P}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as D}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as te}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function uh(z){let d,g,l,f,$;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME12cENvbmZpZyUyQyUyME12cE1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyME1WUCUyMFJVQ0FJQm94JTJGbXZwJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyME12cENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBSVUNBSUJveCUyRm12cCUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwTXZwTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MvpConfig, MvpModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a MVP RUCAIBox/mvp style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = MvpConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the RUCAIBox/mvp style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MvpModel(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`}}),{c(){d=n("p"),g=r("Example:"),l=c(),b(f.$$.fragment)},l(h){d=s(h,"P",{});var _=a(d);g=i(_,"Example:"),_.forEach(o),l=p(h),y(f.$$.fragment,h)},m(h,_){v(h,d,_),e(d,g),v(h,l,_),k(f,h,_),$=!0},p:oe,i(h){$||(M(f.$$.fragment,h),$=!0)},o(h){w(f.$$.fragment,h),$=!1},d(h){h&&o(d),h&&o(l),T(f,h)}}}function fh(z){let d,g,l,f,$;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME12cFRva2VuaXplciUwQSUwQXRva2VuaXplciUyMCUzRCUyME12cFRva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyUlVDQUlCb3glMkZtdnAlMjIpJTBBdG9rZW5pemVyKCUyMkhlbGxvJTIwd29ybGQlMjIpJTVCJTIyaW5wdXRfaWRzJTIyJTVEJTBBJTBBdG9rZW5pemVyKCUyMiUyMEhlbGxvJTIwd29ybGQlMjIpJTVCJTIyaW5wdXRfaWRzJTIyJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MvpTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MvpTokenizer.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mvp&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">0</span>, <span class="hljs-number">31414</span>, <span class="hljs-number">232</span>, <span class="hljs-number">2</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">0</span>, <span class="hljs-number">20920</span>, <span class="hljs-number">232</span>, <span class="hljs-number">2</span>]`}}),{c(){d=n("p"),g=r("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),l=c(),b(f.$$.fragment)},l(h){d=s(h,"P",{});var _=a(d);g=i(_,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),_.forEach(o),l=p(h),y(f.$$.fragment,h)},m(h,_){v(h,d,_),e(d,g),v(h,l,_),k(f,h,_),$=!0},p:oe,i(h){$||(M(f.$$.fragment,h),$=!0)},o(h){w(f.$$.fragment,h),$=!1},d(h){h&&o(d),h&&o(l),T(f,h)}}}function gh(z){let d,g,l,f,$;return{c(){d=n("p"),g=r("When used with "),l=n("code"),f=r("is_split_into_words=True"),$=r(", this tokenizer will add a space before each word (even the first one).")},l(h){d=s(h,"P",{});var _=a(d);g=i(_,"When used with "),l=s(_,"CODE",{});var C=a(l);f=i(C,"is_split_into_words=True"),C.forEach(o),$=i(_,", this tokenizer will add a space before each word (even the first one)."),_.forEach(o)},m(h,_){v(h,d,_),e(d,g),e(d,l),e(l,f),e(d,$)},d(h){h&&o(d)}}}function _h(z){let d,g,l,f,$;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME12cFRva2VuaXplckZhc3QlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBNdnBUb2tlbml6ZXJGYXN0LmZyb21fcHJldHJhaW5lZCglMjJSVUNBSUJveCUyRm12cCUyMiklMEF0b2tlbml6ZXIoJTIySGVsbG8lMjB3b3JsZCUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMEF0b2tlbml6ZXIoJTIyJTIwSGVsbG8lMjB3b3JsZCUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MvpTokenizerFast

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MvpTokenizerFast.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mvp&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">0</span>, <span class="hljs-number">31414</span>, <span class="hljs-number">232</span>, <span class="hljs-number">2</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">0</span>, <span class="hljs-number">20920</span>, <span class="hljs-number">232</span>, <span class="hljs-number">2</span>]`}}),{c(){d=n("p"),g=r("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),l=c(),b(f.$$.fragment)},l(h){d=s(h,"P",{});var _=a(d);g=i(_,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),_.forEach(o),l=p(h),y(f.$$.fragment,h)},m(h,_){v(h,d,_),e(d,g),v(h,l,_),k(f,h,_),$=!0},p:oe,i(h){$||(M(f.$$.fragment,h),$=!0)},o(h){w(f.$$.fragment,h),$=!1},d(h){h&&o(d),h&&o(l),T(f,h)}}}function vh(z){let d,g,l,f,$,h,_,C;return{c(){d=n("p"),g=r("When used with "),l=n("code"),f=r("is_split_into_words=True"),$=r(", this tokenizer needs to be instantiated with "),h=n("code"),_=r("add_prefix_space=True"),C=r(".")},l(de){d=s(de,"P",{});var A=a(d);g=i(A,"When used with "),l=s(A,"CODE",{});var Q=a(l);f=i(Q,"is_split_into_words=True"),Q.forEach(o),$=i(A,", this tokenizer needs to be instantiated with "),h=s(A,"CODE",{});var K=a(h);_=i(K,"add_prefix_space=True"),K.forEach(o),C=i(A,"."),A.forEach(o)},m(de,A){v(de,d,A),e(d,g),e(d,l),e(l,f),e(d,$),e(d,h),e(h,_),e(d,C)},d(de){de&&o(d)}}}function bh(z){let d,g,l,f,$;return{c(){d=n("p"),g=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),l=n("code"),f=r("Module"),$=r(`
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(h){d=s(h,"P",{});var _=a(d);g=i(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),l=s(_,"CODE",{});var C=a(l);f=i(C,"Module"),C.forEach(o),$=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(o)},m(h,_){v(h,d,_),e(d,g),e(d,l),e(l,f),e(d,$)},d(h){h&&o(d)}}}function yh(z){let d,g,l,f,$;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNdnBNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyUlVDQUlCb3glMkZtdnAlMjIpJTBBbW9kZWwlMjAlM0QlMjBNdnBNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyUlVDQUlCb3glMkZtdnAlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MvpModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mvp&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MvpModel.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mvp&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`}}),{c(){d=n("p"),g=r("Example:"),l=c(),b(f.$$.fragment)},l(h){d=s(h,"P",{});var _=a(d);g=i(_,"Example:"),_.forEach(o),l=p(h),y(f.$$.fragment,h)},m(h,_){v(h,d,_),e(d,g),v(h,l,_),k(f,h,_),$=!0},p:oe,i(h){$||(M(f.$$.fragment,h),$=!0)},o(h){w(f.$$.fragment,h),$=!1},d(h){h&&o(d),h&&o(l),T(f,h)}}}function kh(z){let d,g,l,f,$;return{c(){d=n("p"),g=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),l=n("code"),f=r("Module"),$=r(`
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(h){d=s(h,"P",{});var _=a(d);g=i(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),l=s(_,"CODE",{});var C=a(l);f=i(C,"Module"),C.forEach(o),$=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(o)},m(h,_){v(h,d,_),e(d,g),e(d,l),e(l,f),e(d,$)},d(h){h&&o(d)}}}function Mh(z){let d,g;return d=new P({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyME12cEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMlJVQ0FJQm94JTJGbXZwJTIyKSUwQW1vZGVsJTIwJTNEJTIwTXZwRm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJSVUNBSUJveCUyRm12cCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTBBJTIwJTIwJTIwJTIwJTIyU3VtbWFyaXplJTNBJTIwWW91JTIwbWF5JTIwd2FudCUyMHRvJTIwc3RpY2slMjBpdCUyMHRvJTIweW91ciUyMGJvc3MlMjBhbmQlMjBsZWF2ZSUyMHlvdXIlMjBqb2IlMkMlMjBidXQlMjBkb24ndCUyMGRvJTIwaXQlMjBpZiUyMHRoZXNlJTIwYXJlJTIweW91ciUyMHJlYXNvbnMuJTIyJTJDJTBBJTIwJTIwJTIwJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUyQyUwQSklMEFsYWJlbHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyQmFkJTIwUmVhc29ucyUyMFRvJTIwUXVpdCUyMFlvdXIlMjBKb2IlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSU1QiUyMmlucHV0X2lkcyUyMiU1RCUwQSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcyUwQWxvc3MuYmFja3dhcmQoKQ==",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> AutoTokenizer, MvpForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mvp&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MvpForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mvp&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Summarize: You may want to stick it to your boss and leave your job, but don&#x27;t do it if these are your reasons.&quot;</span>,
<span class="hljs-meta">... </span>    return_tensors=<span class="hljs-string">&quot;pt&quot;</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tokenizer(<span class="hljs-string">&quot;Bad Reasons To Quit Your Job&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>loss = model(**inputs, labels=labels).loss
<span class="hljs-meta">&gt;&gt;&gt; </span>loss.backward()`}}),{c(){b(d.$$.fragment)},l(l){y(d.$$.fragment,l)},m(l,f){k(d,l,f),g=!0},p:oe,i(l){g||(M(d.$$.fragment,l),g=!0)},o(l){w(d.$$.fragment,l),g=!1},d(l){T(d,l)}}}function wh(z){let d,g;return d=new P({props:{code:"d2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGdlbmVyYXRlZF9pZHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmlucHV0cyklMEElMEFnZW5lcmF0ZWRfdGV4dCUyMCUzRCUyMHRva2VuaXplci5iYXRjaF9kZWNvZGUoZ2VuZXJhdGVkX2lkcyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    generated_ids = model.generate(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>generated_text = tokenizer.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>)`}}),{c(){b(d.$$.fragment)},l(l){y(d.$$.fragment,l)},m(l,f){k(d,l,f),g=!0},p:oe,i(l){g||(M(d.$$.fragment,l),g=!0)},o(l){w(d.$$.fragment,l),g=!1},d(l){T(d,l)}}}function Th(z){let d,g,l,f,$;return{c(){d=n("p"),g=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),l=n("code"),f=r("Module"),$=r(`
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(h){d=s(h,"P",{});var _=a(d);g=i(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),l=s(_,"CODE",{});var C=a(l);f=i(C,"Module"),C.forEach(o),$=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(o)},m(h,_){v(h,d,_),e(d,g),e(d,l),e(l,f),e(d,$)},d(h){h&&o(d)}}}function $h(z){let d,g;return d=new P({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyME12cEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEFudW1fbGFiZWxzJTIwJTNEJTIwMiUyMCUyMCUyMyUyMGZvciUyMGV4YW1wbGUlMkMlMjB0aGlzJTIwaXMlMjBhJTIwYmluYXJ5JTIwY2xhc3NpZmljYXRpb24lMjB0YXNrJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyUlVDQUlCb3glMkZtdnAlMjIpJTBBbW9kZWwlMjAlM0QlMjBNdnBGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJSVUNBSUJveCUyRm12cCUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJDbGFzc2lmeSUzQSUyMEhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvcigxKSUyMCUyMCUyMyUyMHRoZSUyMHJlYWwlMjBsYWJlbCUyMGZvciUyMGlucHV0cyUwQSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcyUwQWxvc3MuYmFja3dhcmQoKQ==",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> AutoTokenizer, MvpForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-number">2</span>  <span class="hljs-comment"># for example, this is a binary classification task</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mvp&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MvpForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mvp&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Classify: 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-comment"># the real label for inputs</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss
<span class="hljs-meta">&gt;&gt;&gt; </span>loss.backward()`}}),{c(){b(d.$$.fragment)},l(l){y(d.$$.fragment,l)},m(l,f){k(d,l,f),g=!0},p:oe,i(l){g||(M(d.$$.fragment,l),g=!0)},o(l){w(d.$$.fragment,l),g=!1},d(l){T(d,l)}}}function zh(z){let d,g;return d=new P({props:{code:"d2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWQlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = logits.argmax()`}}),{c(){b(d.$$.fragment)},l(l){y(d.$$.fragment,l)},m(l,f){k(d,l,f),g=!0},p:oe,i(l){g||(M(d.$$.fragment,l),g=!0)},o(l){w(d.$$.fragment,l),g=!1},d(l){T(d,l)}}}function Fh(z){let d,g,l,f,$;return{c(){d=n("p"),g=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),l=n("code"),f=r("Module"),$=r(`
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(h){d=s(h,"P",{});var _=a(d);g=i(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),l=s(_,"CODE",{});var C=a(l);f=i(C,"Module"),C.forEach(o),$=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(o)},m(h,_){v(h,d,_),e(d,g),e(d,l),e(l,f),e(d,$)},d(h){h&&o(d)}}}function Ch(z){let d,g;return d=new P({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyME12cEZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyUlVDQUlCb3glMkZtdnAlMjIpJTBBbW9kZWwlMjAlM0QlMjBNdnBGb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIyUlVDQUlCb3glMkZtdnAlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUwQSUyMCUyMCUyMCUyMCUyMkFuc3dlciUyMHRoZSUyMGZvbGxvd2luZyUyMHF1ZXN0aW9uJTNBJTIwV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIwJTVCU0VQJTVEJTIwSmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMkMlMEElMjAlMjAlMjAlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTJDJTBBKSUwQXRhcmdldF9zdGFydF9pbmRleCUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxOCU1RCklMEF0YXJnZXRfZW5kX2luZGV4JTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QjE5JTVEKSUwQSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KS5sb3NzJTBBbG9zcy5iYWNrd2FyZCgp",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> AutoTokenizer, MvpForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mvp&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MvpForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mvp&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Answer the following question: Who was Jim Henson? [SEP] Jim Henson was a nice puppet&quot;</span>,
<span class="hljs-meta">... </span>    return_tensors=<span class="hljs-string">&quot;pt&quot;</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = torch.tensor([<span class="hljs-number">18</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = torch.tensor([<span class="hljs-number">19</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, start_positions=target_start_index, end_positions=target_end_index).loss
<span class="hljs-meta">&gt;&gt;&gt; </span>loss.backward()`}}),{c(){b(d.$$.fragment)},l(l){y(d.$$.fragment,l)},m(l,f){k(d,l,f),g=!0},p:oe,i(l){g||(M(d.$$.fragment,l),g=!0)},o(l){w(d.$$.fragment,l),g=!1},d(l){T(d,l)}}}function jh(z){let d,g;return d=new P({props:{code:"d2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMG91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFhbnN3ZXJfc3RhcnRfaW5kZXglMjAlM0QlMjBvdXRwdXRzLnN0YXJ0X2xvZ2l0cy5hcmdtYXgoKSUwQWFuc3dlcl9lbmRfaW5kZXglMjAlM0QlMjBvdXRwdXRzLmVuZF9sb2dpdHMuYXJnbWF4KCklMEElMEFwcmVkaWN0X2Fuc3dlcl90b2tlbnMlMjAlM0QlMjBpbnB1dHMuaW5wdXRfaWRzJTVCMCUyQyUyMGFuc3dlcl9zdGFydF9pbmRleCUyMCUzQSUyMGFuc3dlcl9lbmRfaW5kZXglMjAlMkIlMjAxJTVEJTBBcHJlZGljdF9hbnN3ZXIlMjAlM0QlMjB0b2tlbml6ZXIuZGVjb2RlKHByZWRpY3RfYW5zd2VyX3Rva2Vucyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>answer_start_index = outputs.start_logits.argmax()
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = outputs.end_logits.argmax()

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer = tokenizer.decode(predict_answer_tokens)`}}),{c(){b(d.$$.fragment)},l(l){y(d.$$.fragment,l)},m(l,f){k(d,l,f),g=!0},p:oe,i(l){g||(M(d.$$.fragment,l),g=!0)},o(l){w(d.$$.fragment,l),g=!1},d(l){T(d,l)}}}function Uh(z){let d,g,l,f,$;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNdnBGb3JDYXVzYWxMTSUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMlJVQ0FJQm94JTJGbXZwJTIyKSUwQW1vZGVsJTIwJTNEJTIwTXZwRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMlJVQ0FJQm94JTJGbXZwJTIyJTJDJTIwYWRkX2Nyb3NzX2F0dGVudGlvbiUzREZhbHNlKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHMlMEFsaXN0KGxvZ2l0cy5zaGFwZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MvpForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mvp&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MvpForCausalLM.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mvp&quot;</span>, add_cross_attention=<span class="hljs-literal">False</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>logits = outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(logits.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">8</span>, <span class="hljs-number">50267</span>]`}}),{c(){d=n("p"),g=r("Example:"),l=c(),b(f.$$.fragment)},l(h){d=s(h,"P",{});var _=a(d);g=i(_,"Example:"),_.forEach(o),l=p(h),y(f.$$.fragment,h)},m(h,_){v(h,d,_),e(d,g),v(h,l,_),k(f,h,_),$=!0},p:oe,i(h){$||(M(f.$$.fragment,h),$=!0)},o(h){w(f.$$.fragment,h),$=!1},d(h){h&&o(d),h&&o(l),T(f,h)}}}function xh(z){let d,g,l,f,$,h,_,C,de,A,Q,K,dn,ht,Na,ln,Sa,qs,Ce,Xa,mt,Qa,La,Js,To,Ha,Es,L,cn,Oa,Ya,pn,Da,Ka,hn,er,tr,mn,or,Is,$o,nr,Ws,H,ut,sr,ft,ar,rr,ir,gt,dr,un,lr,cr,pr,_t,hr,fn,mr,ur,fr,le,gr,vt,_r,vr,gn,br,yr,Vs,ne,kr,bt,Mr,wr,yt,Tr,$r,Bs,ce,je,_n,kt,zr,vn,Fr,Zs,Mt,Gs,zo,Cr,Rs,wt,Ps,se,jr,bn,Ur,xr,Tt,qr,Jr,As,$t,Ns,pe,Ue,yn,zt,Er,kn,Ir,Ss,I,Mn,Fo,Wr,Vr,wn,Co,Br,Zr,Tn,jo,Gr,Rr,$n,Uo,Pr,Ar,zn,xo,Nr,Sr,Fn,qo,Xr,Xs,he,xe,Cn,Ft,Qr,jn,Lr,Qs,N,Ct,Hr,me,Or,Jo,Yr,Dr,jt,Kr,ei,ti,ue,oi,Eo,ni,si,Io,ai,ri,ii,qe,Ls,fe,Je,Un,Ut,di,xn,li,Hs,F,xt,ci,qn,pi,hi,Jn,mi,ui,Ee,fi,qt,gi,En,_i,vi,bi,Ie,yi,Jt,ki,Wo,Mi,wi,Ti,ae,Et,$i,In,zi,Fi,It,Vo,Ci,Wn,ji,Ui,Bo,xi,Vn,qi,Ji,We,Wt,Ei,Bn,Ii,Wi,Ve,Vt,Vi,Zn,Bi,Zi,Be,Bt,Gi,Zt,Ri,Gn,Pi,Ai,Os,ge,Ze,Rn,Gt,Ni,Pn,Si,Ys,U,Rt,Xi,Pt,Qi,An,Li,Hi,Oi,Nn,Yi,Di,Ge,Ki,At,ed,Sn,td,od,nd,Re,sd,Nt,ad,Zo,rd,id,dd,Pe,St,ld,Xn,cd,Ds,_e,Ae,Qn,Xt,pd,Ln,hd,Ks,S,Qt,md,Lt,ud,Go,fd,gd,_d,Ht,vd,Ot,bd,yd,kd,O,Yt,Md,ve,wd,Ro,Td,$d,Hn,zd,Fd,Cd,Ne,jd,Se,ea,be,Xe,On,Dt,Ud,Yn,xd,ta,X,Kt,qd,eo,Jd,Po,Ed,Id,Wd,to,Vd,oo,Bd,Zd,Gd,x,no,Rd,ye,Pd,Ao,Ad,Nd,Dn,Sd,Xd,Qd,Qe,Ld,Kn,Hd,Od,es,Yd,Dd,Le,Kd,ts,el,tl,He,oa,ke,Oe,os,so,ol,ns,nl,na,G,ao,sl,ss,al,rl,ro,il,No,dl,ll,cl,io,pl,lo,hl,ml,ul,q,co,fl,Me,gl,So,_l,vl,as,bl,yl,kl,Ye,Ml,rs,wl,Tl,po,$l,is,zl,Fl,Cl,De,jl,ds,Ul,xl,Ke,sa,we,et,ls,ho,ql,cs,Jl,aa,R,mo,El,Te,Il,ps,Wl,Vl,hs,Bl,Zl,Gl,uo,Rl,Xo,Pl,Al,Nl,fo,Sl,go,Xl,Ql,Ll,J,_o,Hl,$e,Ol,Qo,Yl,Dl,ms,Kl,ec,tc,tt,oc,us,nc,sc,Lo,ac,fs,rc,ic,ot,dc,gs,lc,cc,nt,ra,ze,st,_s,vo,pc,vs,hc,ia,Fe,bo,mc,at,yo,uc,rt,da;return h=new D({}),ht=new D({}),kt=new D({}),Mt=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME12cFRva2VuaXplciUyQyUyME12cEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQSUwQXRva2VuaXplciUyMCUzRCUyME12cFRva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyUlVDQUlCb3glMkZtdnAlMjIpJTBBbW9kZWwlMjAlM0QlMjBNdnBGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMlJVQ0FJQm94JTJGbXZwJTIyKSUwQW1vZGVsX3dpdGhfcHJvbXB0JTIwJTNEJTIwTXZwRm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJSVUNBSUJveCUyRm12cC1zdW1tYXJpemF0aW9uJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMEElMjAlMjAlMjAlMjAlMjJTdW1tYXJpemUlM0ElMjBZb3UlMjBtYXklMjB3YW50JTIwdG8lMjBzdGljayUyMGl0JTIwdG8lMjB5b3VyJTIwYm9zcyUyMGFuZCUyMGxlYXZlJTIweW91ciUyMGpvYiUyQyUyMGJ1dCUyMGRvbid0JTIwZG8lMjBpdCUyMGlmJTIwdGhlc2UlMjBhcmUlMjB5b3VyJTIwcmVhc29ucy4lMjIlMkMlMEElMjAlMjAlMjAlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTJDJTBBKSUwQWdlbmVyYXRlZF9pZHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmlucHV0cyklMEF0b2tlbml6ZXIuYmF0Y2hfZGVjb2RlKGdlbmVyYXRlZF9pZHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklMEElMEFnZW5lcmF0ZWRfaWRzJTIwJTNEJTIwbW9kZWxfd2l0aF9wcm9tcHQuZ2VuZXJhdGUoKippbnB1dHMpJTBBdG9rZW5pemVyLmJhdGNoX2RlY29kZShnZW5lcmF0ZWRfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MvpTokenizer, MvpForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MvpTokenizer.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mvp&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MvpForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mvp&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model_with_prompt = MvpForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mvp-summarization&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Summarize: You may want to stick it to your boss and leave your job, but don&#x27;t do it if these are your reasons.&quot;</span>,
<span class="hljs-meta">... </span>    return_tensors=<span class="hljs-string">&quot;pt&quot;</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>)
[<span class="hljs-string">&quot;Why You Shouldn&#x27;t Quit Your Job&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model_with_prompt.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>)
[<span class="hljs-string">&quot;Don&#x27;t do it if these are your reasons&quot;</span>]`}}),wt=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME12cFRva2VuaXplckZhc3QlMkMlMjBNdnBGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBNdnBUb2tlbml6ZXJGYXN0LmZyb21fcHJldHJhaW5lZCglMjJSVUNBSUJveCUyRm12cCUyMiklMEFtb2RlbCUyMCUzRCUyME12cEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyUlVDQUlCb3glMkZtdnAlMjIpJTBBbW9kZWxfd2l0aF9tdGwlMjAlM0QlMjBNdnBGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMlJVQ0FJQm94JTJGbXRsLWRhdGEtdG8tdGV4dCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTBBJTIwJTIwJTIwJTIwJTIyRGVzY3JpYmUlMjB0aGUlMjBmb2xsb3dpbmclMjBkYXRhJTNBJTIwSXJvbiUyME1hbiUyMCU3QyUyMGluc3RhbmNlJTIwb2YlMjAlN0MlMjBTdXBlcmhlcm8lMjAlNUJTRVAlNUQlMjBTdGFuJTIwTGVlJTIwJTdDJTIwY3JlYXRvciUyMCU3QyUyMElyb24lMjBNYW4lMjIlMkMlMEElMjAlMjAlMjAlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTJDJTBBKSUwQWdlbmVyYXRlZF9pZHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmlucHV0cyklMEF0b2tlbml6ZXIuYmF0Y2hfZGVjb2RlKGdlbmVyYXRlZF9pZHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklMEElMEFnZW5lcmF0ZWRfaWRzJTIwJTNEJTIwbW9kZWxfd2l0aF9tdGwuZ2VuZXJhdGUoKippbnB1dHMpJTBBdG9rZW5pemVyLmJhdGNoX2RlY29kZShnZW5lcmF0ZWRfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MvpTokenizerFast, MvpForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MvpTokenizerFast.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mvp&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MvpForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mvp&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model_with_mtl = MvpForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mtl-data-to-text&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Describe the following data: Iron Man | instance of | Superhero [SEP] Stan Lee | creator | Iron Man&quot;</span>,
<span class="hljs-meta">... </span>    return_tensors=<span class="hljs-string">&quot;pt&quot;</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>)
[<span class="hljs-string">&#x27;Stan Lee created the character of Iron Man, a fictional superhero appearing in American comic&#x27;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model_with_mtl.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>)
[<span class="hljs-string">&#x27;Iron Man is a fictional superhero appearing in American comic books published by Marvel Comics.&#x27;</span>]`}}),$t=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME12cEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQSUwQW1vZGVsJTIwJTNEJTIwTXZwRm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJSVUNBSUJveCUyRm12cCUyMiUyQyUyMHVzZV9wcm9tcHQlM0RUcnVlKSUwQSUyMyUyMHRoZSUyMG51bWJlciUyMG9mJTIwdHJhaW5hYmxlJTIwcGFyYW1ldGVycyUyMChmdWxsJTIwdHVuaW5nKSUwQXN1bShwLm51bWVsKCklMjBmb3IlMjBwJTIwaW4lMjBtb2RlbC5wYXJhbWV0ZXJzKCklMjBpZiUyMHAucmVxdWlyZXNfZ3JhZCklMEElMEElMjMlMjBsaWdodHdlaWdodCUyMHR1bmluZyUyMHdpdGglMjByYW5kb21seSUyMGluaXRpYWxpemVkJTIwcHJvbXB0cyUwQW1vZGVsLnNldF9saWdodHdlaWdodF90dW5pbmcoKSUwQSUyMyUyMHRoZSUyMG51bWJlciUyMG9mJTIwdHJhaW5hYmxlJTIwcGFyYW1ldGVycyUyMChsaWdodHdlaWdodCUyMHR1bmluZyklMEFzdW0ocC5udW1lbCgpJTIwZm9yJTIwcCUyMGluJTIwbW9kZWwucGFyYW1ldGVycygpJTIwaWYlMjBwLnJlcXVpcmVzX2dyYWQpJTBBJTBBJTIzJTIwbGlnaHR3ZWlnaHQlMjB0dW5pbmclMjB3aXRoJTIwdGFzay1zcGVjaWZpYyUyMHByb21wdHMlMEFtb2RlbCUyMCUzRCUyME12cEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyUlVDQUlCb3glMkZtdGwtZGF0YS10by10ZXh0JTIyKSUwQW1vZGVsLnNldF9saWdodHdlaWdodF90dW5pbmcoKSUwQSUyMyUyMG9yaWdpbmFsJTIwbGlnaHR3ZWlnaHQlMjBQcmVmaXgtdHVuaW5nJTBBbW9kZWwlMjAlM0QlMjBNdnBGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGYmFydC1sYXJnZSUyMiUyQyUyMHVzZV9wcm9tcHQlM0RUcnVlKSUwQW1vZGVsLnNldF9saWdodHdlaWdodF90dW5pbmcoKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MvpForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = MvpForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mvp&quot;</span>, use_prompt=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the number of trainable parameters (full tuning)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">sum</span>(p.numel() <span class="hljs-keyword">for</span> p <span class="hljs-keyword">in</span> model.parameters() <span class="hljs-keyword">if</span> p.requires_grad)
<span class="hljs-number">468116832</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># lightweight tuning with randomly initialized prompts</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model.set_lightweight_tuning()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the number of trainable parameters (lightweight tuning)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">sum</span>(p.numel() <span class="hljs-keyword">for</span> p <span class="hljs-keyword">in</span> model.parameters() <span class="hljs-keyword">if</span> p.requires_grad)
<span class="hljs-number">61823328</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># lightweight tuning with task-specific prompts</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MvpForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mtl-data-to-text&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model.set_lightweight_tuning()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># original lightweight Prefix-tuning</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MvpForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/bart-large&quot;</span>, use_prompt=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model.set_lightweight_tuning()`}}),zt=new D({}),Ft=new D({}),Ct=new E({props:{name:"class transformers.MvpConfig",anchor:"transformers.MvpConfig",parameters:[{name:"vocab_size",val:" = 50267"},{name:"max_position_embeddings",val:" = 1024"},{name:"encoder_layers",val:" = 12"},{name:"encoder_ffn_dim",val:" = 4096"},{name:"encoder_attention_heads",val:" = 16"},{name:"decoder_layers",val:" = 12"},{name:"decoder_ffn_dim",val:" = 4096"},{name:"decoder_attention_heads",val:" = 16"},{name:"encoder_layerdrop",val:" = 0.0"},{name:"decoder_layerdrop",val:" = 0.0"},{name:"activation_function",val:" = 'gelu'"},{name:"d_model",val:" = 1024"},{name:"dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.0"},{name:"activation_dropout",val:" = 0.0"},{name:"init_std",val:" = 0.02"},{name:"classifier_dropout",val:" = 0.0"},{name:"scale_embedding",val:" = False"},{name:"use_cache",val:" = True"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"is_encoder_decoder",val:" = True"},{name:"decoder_start_token_id",val:" = 2"},{name:"forced_eos_token_id",val:" = 2"},{name:"use_prompt",val:" = False"},{name:"prompt_length",val:" = 100"},{name:"prompt_mid_dim",val:" = 800"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MvpConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50267) &#x2014;
Vocabulary size of the MVP model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/mvp#transformers.MvpModel">MvpModel</a>.`,name:"vocab_size"},{anchor:"transformers.MvpConfig.d_model",description:`<strong>d_model</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Dimensionality of the layers and the pooler layer.`,name:"d_model"},{anchor:"transformers.MvpConfig.encoder_layers",description:`<strong>encoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of encoder layers.`,name:"encoder_layers"},{anchor:"transformers.MvpConfig.decoder_layers",description:`<strong>decoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of decoder layers.`,name:"decoder_layers"},{anchor:"transformers.MvpConfig.encoder_attention_heads",description:`<strong>encoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"encoder_attention_heads"},{anchor:"transformers.MvpConfig.decoder_attention_heads",description:`<strong>decoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer decoder.`,name:"decoder_attention_heads"},{anchor:"transformers.MvpConfig.decoder_ffn_dim",description:`<strong>decoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"decoder_ffn_dim"},{anchor:"transformers.MvpConfig.encoder_ffn_dim",description:`<strong>encoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"encoder_ffn_dim"},{anchor:"transformers.MvpConfig.activation_function",description:`<strong>activation_function</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"activation_function"},{anchor:"transformers.MvpConfig.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.MvpConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.MvpConfig.activation_dropout",description:`<strong>activation_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for activations inside the fully connected layer.`,name:"activation_dropout"},{anchor:"transformers.MvpConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for classifier.`,name:"classifier_dropout"},{anchor:"transformers.MvpConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#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.MvpConfig.init_std",description:`<strong>init_std</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:"init_std"},{anchor:"transformers.MvpConfig.encoder_layerdrop",description:`<strong>encoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The LayerDrop probability for the encoder. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>)
for more details.`,name:"encoder_layerdrop"},{anchor:"transformers.MvpConfig.decoder_layerdrop",description:`<strong>decoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The LayerDrop probability for the decoder. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>)
for more details.`,name:"decoder_layerdrop"},{anchor:"transformers.MvpConfig.scale_embedding",description:`<strong>scale_embedding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Scale embeddings by diving by sqrt(d_model).`,name:"scale_embedding"},{anchor:"transformers.MvpConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models).`,name:"use_cache"},{anchor:"transformers.MvpConfig.forced_eos_token_id",description:`<strong>forced_eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The id of the token to force as the last generated token when <code>max_length</code> is reached. Usually set to
<code>eos_token_id</code>.`,name:"forced_eos_token_id"},{anchor:"transformers.MvpConfig.use_prompt",description:`<strong>use_prompt</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use prompt.`,name:"use_prompt"},{anchor:"transformers.MvpConfig.prompt_length",description:`<strong>prompt_length</strong> (<code>int</code>, <em>optional</em>, defaults to 100) &#x2014;
The length of prompt.`,name:"prompt_length"},{anchor:"transformers.MvpConfig.prompt_mid_dim",description:`<strong>prompt_mid_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 800) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; layer in prompt.`,name:"prompt_mid_dim"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mvp/configuration_mvp.py#L29"}}),qe=new te({props:{anchor:"transformers.MvpConfig.example",$$slots:{default:[uh]},$$scope:{ctx:z}}}),Ut=new D({}),xt=new E({props:{name:"class transformers.MvpTokenizer",anchor:"transformers.MvpTokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"errors",val:" = 'replace'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"add_prefix_space",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MvpTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.MvpTokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.MvpTokenizer.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.MvpTokenizer.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.MvpTokenizer.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.MvpTokenizer.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.MvpTokenizer.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.MvpTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.MvpTokenizer.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.MvpTokenizer.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.MvpTokenizer.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word. (MVP tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mvp/tokenization_mvp.py#L89"}}),Ee=new te({props:{anchor:"transformers.MvpTokenizer.example",$$slots:{default:[fh]},$$scope:{ctx:z}}}),Ie=new rn({props:{$$slots:{default:[gh]},$$scope:{ctx:z}}}),Et=new E({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.MvpTokenizer.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"}],parametersDescription:[{anchor:"transformers.MvpTokenizer.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.MvpTokenizer.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mvp/tokenization_mvp.py#L327",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>
`}}),Wt=new E({props:{name:"convert_tokens_to_string",anchor:"transformers.MvpTokenizer.convert_tokens_to_string",parameters:[{name:"tokens",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mvp/tokenization_mvp.py#L292"}}),Vt=new E({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.MvpTokenizer.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"}],parametersDescription:[{anchor:"transformers.MvpTokenizer.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.MvpTokenizer.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mvp/tokenization_mvp.py#L379",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Bt=new E({props:{name:"get_special_tokens_mask",anchor:"transformers.MvpTokenizer.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"}],parametersDescription:[{anchor:"transformers.MvpTokenizer.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.MvpTokenizer.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.MvpTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mvp/tokenization_mvp.py#L352",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>
`}}),Gt=new D({}),Rt=new E({props:{name:"class transformers.MvpTokenizerFast",anchor:"transformers.MvpTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"merges_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"errors",val:" = 'replace'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"add_prefix_space",val:" = False"},{name:"trim_offsets",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MvpTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.MvpTokenizerFast.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.MvpTokenizerFast.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.MvpTokenizerFast.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.MvpTokenizerFast.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.MvpTokenizerFast.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.MvpTokenizerFast.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.MvpTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.MvpTokenizerFast.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.MvpTokenizerFast.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.MvpTokenizerFast.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word. (MVP tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"},{anchor:"transformers.MvpTokenizerFast.trim_offsets",description:`<strong>trim_offsets</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the post processing step should trim offsets to avoid including whitespaces.`,name:"trim_offsets"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mvp/tokenization_mvp_fast.py#L53"}}),Ge=new te({props:{anchor:"transformers.MvpTokenizerFast.example",$$slots:{default:[_h]},$$scope:{ctx:z}}}),Re=new rn({props:{$$slots:{default:[vh]},$$scope:{ctx:z}}}),St=new E({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.MvpTokenizerFast.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"}],parametersDescription:[{anchor:"transformers.MvpTokenizerFast.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.MvpTokenizerFast.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mvp/tokenization_mvp_fast.py#L268",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Xt=new D({}),Qt=new E({props:{name:"class transformers.MvpModel",anchor:"transformers.MvpModel",parameters:[{name:"config",val:": MvpConfig"}],parametersDescription:[{anchor:"transformers.MvpModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mvp#transformers.MvpConfig">MvpConfig</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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mvp/modeling_mvp.py#L1301"}}),Yt=new E({props:{name:"forward",anchor:"transformers.MvpModel.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.MvpModel.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. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.MvpModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.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.MvpModel.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Mvp uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.MvpModel.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read <code>modeling_mvp._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.MvpModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. 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.MvpModel.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. 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:"decoder_head_mask"},{anchor:"transformers.MvpModel.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. 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:"cross_attn_head_mask"},{anchor:"transformers.MvpModel.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.MvpModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): 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:"past_key_values"},{anchor:"transformers.MvpModel.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.MvpModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.MvpModel.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.MvpModel.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.MvpModel.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mvp/modeling_mvp.py#L1340",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</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/main/en/model_doc/mvp#transformers.MvpConfig"
>MvpConfig</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 decoder of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_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, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_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 of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_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, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_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 of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ne=new rn({props:{$$slots:{default:[bh]},$$scope:{ctx:z}}}),Se=new te({props:{anchor:"transformers.MvpModel.forward.example",$$slots:{default:[yh]},$$scope:{ctx:z}}}),Dt=new D({}),Kt=new E({props:{name:"class transformers.MvpForConditionalGeneration",anchor:"transformers.MvpForConditionalGeneration",parameters:[{name:"config",val:": MvpConfig"}],parametersDescription:[{anchor:"transformers.MvpForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mvp#transformers.MvpConfig">MvpConfig</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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mvp/modeling_mvp.py#L1438"}}),no=new E({props:{name:"forward",anchor:"transformers.MvpForConditionalGeneration.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.MvpForConditionalGeneration.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. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.MvpForConditionalGeneration.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.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.MvpForConditionalGeneration.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Mvp uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.MvpForConditionalGeneration.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read <code>modeling_mvp._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.MvpForConditionalGeneration.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. 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.MvpForConditionalGeneration.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. 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:"decoder_head_mask"},{anchor:"transformers.MvpForConditionalGeneration.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. 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:"cross_attn_head_mask"},{anchor:"transformers.MvpForConditionalGeneration.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.MvpForConditionalGeneration.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): 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:"past_key_values"},{anchor:"transformers.MvpForConditionalGeneration.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.MvpForConditionalGeneration.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.MvpForConditionalGeneration.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.MvpForConditionalGeneration.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.MvpForConditionalGeneration.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MvpForConditionalGeneration.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 either be in <code>[0, ..., config.vocab_size]</code> or -100 (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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mvp/modeling_mvp.py#L1480",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</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/main/en/model_doc/mvp#transformers.MvpConfig"
>MvpConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss.</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>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_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, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_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 of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_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, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_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 of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Qe=new rn({props:{$$slots:{default:[kh]},$$scope:{ctx:z}}}),Le=new te({props:{anchor:"transformers.MvpForConditionalGeneration.forward.example",$$slots:{default:[Mh]},$$scope:{ctx:z}}}),He=new te({props:{anchor:"transformers.MvpForConditionalGeneration.forward.example-2",$$slots:{default:[wh]},$$scope:{ctx:z}}}),so=new D({}),ao=new E({props:{name:"class transformers.MvpForSequenceClassification",anchor:"transformers.MvpForSequenceClassification",parameters:[{name:"config",val:": MvpConfig"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MvpForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mvp#transformers.MvpConfig">MvpConfig</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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mvp/modeling_mvp.py#L1610"}}),co=new E({props:{name:"forward",anchor:"transformers.MvpForSequenceClassification.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.MvpForSequenceClassification.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. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.MvpForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.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.MvpForSequenceClassification.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Mvp uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.MvpForSequenceClassification.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read <code>modeling_mvp._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.MvpForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. 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.MvpForSequenceClassification.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. 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:"decoder_head_mask"},{anchor:"transformers.MvpForSequenceClassification.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. 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:"cross_attn_head_mask"},{anchor:"transformers.MvpForSequenceClassification.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.MvpForSequenceClassification.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): 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:"past_key_values"},{anchor:"transformers.MvpForSequenceClassification.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.MvpForSequenceClassification.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.MvpForSequenceClassification.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.MvpForSequenceClassification.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.MvpForSequenceClassification.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MvpForSequenceClassification.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 &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mvp/modeling_mvp.py#L1630"}}),Ye=new rn({props:{$$slots:{default:[Th]},$$scope:{ctx:z}}}),De=new te({props:{anchor:"transformers.MvpForSequenceClassification.forward.example",$$slots:{default:[$h]},$$scope:{ctx:z}}}),Ke=new te({props:{anchor:"transformers.MvpForSequenceClassification.forward.example-2",$$slots:{default:[zh]},$$scope:{ctx:z}}}),ho=new D({}),mo=new E({props:{name:"class transformers.MvpForQuestionAnswering",anchor:"transformers.MvpForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.MvpForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mvp#transformers.MvpConfig">MvpConfig</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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mvp/modeling_mvp.py#L1737"}}),_o=new E({props:{name:"forward",anchor:"transformers.MvpForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": Tensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.MvpForQuestionAnswering.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. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.MvpForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.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.MvpForQuestionAnswering.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Mvp uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.MvpForQuestionAnswering.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read <code>modeling_mvp._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.MvpForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. 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.MvpForQuestionAnswering.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. 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:"decoder_head_mask"},{anchor:"transformers.MvpForQuestionAnswering.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. 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:"cross_attn_head_mask"},{anchor:"transformers.MvpForQuestionAnswering.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.MvpForQuestionAnswering.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): 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:"past_key_values"},{anchor:"transformers.MvpForQuestionAnswering.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.MvpForQuestionAnswering.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.MvpForQuestionAnswering.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.MvpForQuestionAnswering.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.MvpForQuestionAnswering.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MvpForQuestionAnswering.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 (<em>sequence_length</em>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.MvpForQuestionAnswering.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 (<em>sequence_length</em>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mvp/modeling_mvp.py#L1756"}}),tt=new rn({props:{$$slots:{default:[Fh]},$$scope:{ctx:z}}}),ot=new te({props:{anchor:"transformers.MvpForQuestionAnswering.forward.example",$$slots:{default:[Ch]},$$scope:{ctx:z}}}),nt=new te({props:{anchor:"transformers.MvpForQuestionAnswering.forward.example-2",$$slots:{default:[jh]},$$scope:{ctx:z}}}),vo=new D({}),bo=new E({props:{name:"class transformers.MvpForCausalLM",anchor:"transformers.MvpForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mvp/modeling_mvp.py#L1868"}}),yo=new E({props:{name:"forward",anchor:"transformers.MvpForCausalLM.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.MvpForCausalLM.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. Padding will be ignored by default should you
provide it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.MvpForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.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.MvpForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention
if the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.MvpForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used
in the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:`,name:"encoder_attention_mask"},{anchor:"transformers.MvpForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the 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.MvpForCausalLM.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-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:"cross_attn_head_mask"},{anchor:"transformers.MvpForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of
shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>. The two additional
tensors are only required when the model is used as a decoder in a Sequence to Sequence model.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the
cross-attention blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those
that don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of
all <code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.MvpForCausalLM.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 either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"},{anchor:"transformers.MvpForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding
(see <code>past_key_values</code>).</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"use_cache"},{anchor:"transformers.MvpForCausalLM.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.MvpForCausalLM.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.MvpForCausalLM.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mvp/modeling_mvp.py#L1905",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/mvp#transformers.MvpConfig"
>MvpConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
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 optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),rt=new te({props:{anchor:"transformers.MvpForCausalLM.forward.example",$$slots:{default:[Uh]},$$scope:{ctx:z}}}),{c(){d=n("meta"),g=c(),l=n("h1"),f=n("a"),$=n("span"),b(h.$$.fragment),_=c(),C=n("span"),de=r("MVP"),A=c(),Q=n("h2"),K=n("a"),dn=n("span"),b(ht.$$.fragment),Na=c(),ln=n("span"),Sa=r("Overview"),qs=c(),Ce=n("p"),Xa=r("The MVP model was proposed in "),mt=n("a"),Qa=r("MVP: Multi-task Supervised Pre-training for Natural Language Generation"),La=r(" by Tianyi Tang, Junyi Li, Wayne Xin Zhao and Ji-Rong Wen."),Js=c(),To=n("p"),Ha=r("According to the abstract,"),Es=c(),L=n("ul"),cn=n("li"),Oa=r("MVP follows a standard Transformer encoder-decoder architecture."),Ya=c(),pn=n("li"),Da=r("MVP is supervised pre-trained using labeled datasets."),Ka=c(),hn=n("li"),er=r("MVP also has task-specific soft prompts to stimulate the model\u2019s capacity in performing a certain task."),tr=c(),mn=n("li"),or=r("MVP is specially designed for natural language generation and can be adapted to a wide range of generation tasks, including but not limited to summarization, data-to-text generation, open-ended dialogue system, story generation, question answering, question generation, task-oriented dialogue system, commonsense generation, paraphrase generation, text style transfer, and text simplification. Our model can also be adapted to natural language understanding tasks such as sequence classification and (extractive) question answering."),Is=c(),$o=n("p"),nr=r("Tips:"),Ws=c(),H=n("ul"),ut=n("li"),sr=r("We have released a series of models "),ft=n("a"),ar=r("here"),rr=r(", including MVP, MVP with task-specific prompts, and multi-task pre-trained variants."),ir=c(),gt=n("li"),dr=r("If you want to use a model without prompts (standard Transformer), you can load it through "),un=n("code"),lr=r("MvpForConditionalGeneration.from_pretrained('RUCAIBox/mvp')"),cr=r("."),pr=c(),_t=n("li"),hr=r("If you want to use a model with task-specific prompts, such as summarization, you can load it through "),fn=n("code"),mr=r("MvpForConditionalGeneration.from_pretrained('RUCAIBox/mvp-summarization')"),ur=r("."),fr=c(),le=n("li"),gr=r("Our model supports lightweight prompt tuning following "),vt=n("a"),_r=r("Prefix-tuning"),vr=r(" with method "),gn=n("code"),br=r("set_lightweight_tuning()"),yr=r("."),Vs=c(),ne=n("p"),kr=r("This model was contributed by "),bt=n("a"),Mr=r("Tianyi Tang"),wr=r(". The detailed information and instructions can be found "),yt=n("a"),Tr=r("here"),$r=r("."),Bs=c(),ce=n("h2"),je=n("a"),_n=n("span"),b(kt.$$.fragment),zr=c(),vn=n("span"),Fr=r("Examples"),Zs=r(`

For summarization, it is an example to use MVP and MVP with summarization-specific prompts.

	`),b(Mt.$$.fragment),Gs=c(),zo=n("p"),Cr=r("For data-to-text generation, it is an example to use MVP and multi-task pre-trained variants."),Rs=c(),b(wt.$$.fragment),Ps=c(),se=n("p"),jr=r("For lightweight tuning, "),bn=n("em"),Ur=r("i.e."),xr=r(", fixing the model and only tuning prompts, you can load MVP with randomly initialized prompts or with task-specific prompts. Our code also supports Prefix-tuning with BART following the "),Tt=n("a"),qr=r("original paper"),Jr=r("."),As=c(),b($t.$$.fragment),Ns=c(),pe=n("h2"),Ue=n("a"),yn=n("span"),b(zt.$$.fragment),Er=c(),kn=n("span"),Ir=r("Documentation resources"),Ss=c(),I=n("ul"),Mn=n("li"),Fo=n("a"),Wr=r("Text classification task guide"),Vr=c(),wn=n("li"),Co=n("a"),Br=r("Question answering task guide"),Zr=c(),Tn=n("li"),jo=n("a"),Gr=r("Causal language modeling task guide"),Rr=c(),$n=n("li"),Uo=n("a"),Pr=r("Masked language modeling task guide"),Ar=c(),zn=n("li"),xo=n("a"),Nr=r("Translation task guide"),Sr=c(),Fn=n("li"),qo=n("a"),Xr=r("Summarization task guide"),Xs=c(),he=n("h2"),xe=n("a"),Cn=n("span"),b(Ft.$$.fragment),Qr=c(),jn=n("span"),Lr=r("MvpConfig"),Qs=c(),N=n("div"),b(Ct.$$.fragment),Hr=c(),me=n("p"),Or=r("This is the configuration class to store the configuration of a "),Jo=n("a"),Yr=r("MvpModel"),Dr=r(`. It is used to instantiate a MVP 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 MVP `),jt=n("a"),Kr=r("RUCAIBox/mvp"),ei=r(`
architecture.`),ti=c(),ue=n("p"),oi=r("Configuration objects inherit from "),Eo=n("a"),ni=r("PretrainedConfig"),si=r(` and can be used to control the model outputs. Read the
documentation from `),Io=n("a"),ai=r("PretrainedConfig"),ri=r(" for more information."),ii=c(),b(qe.$$.fragment),Ls=c(),fe=n("h2"),Je=n("a"),Un=n("span"),b(Ut.$$.fragment),di=c(),xn=n("span"),li=r("MvpTokenizer"),Hs=c(),F=n("div"),b(xt.$$.fragment),ci=c(),qn=n("p"),pi=r("Constructs a MVP tokenizer, which is smilar to the RoBERTa tokenizer, using byte-level Byte-Pair-Encoding."),hi=c(),Jn=n("p"),mi=r("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),ui=c(),b(Ee.$$.fragment),fi=c(),qt=n("p"),gi=r("You can get around that behavior by passing "),En=n("code"),_i=r("add_prefix_space=True"),vi=r(` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),bi=c(),b(Ie.$$.fragment),yi=c(),Jt=n("p"),ki=r("This tokenizer inherits from "),Wo=n("a"),Mi=r("PreTrainedTokenizer"),wi=r(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Ti=c(),ae=n("div"),b(Et.$$.fragment),$i=c(),In=n("p"),zi=r(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A MVP sequence has the following format:`),Fi=c(),It=n("ul"),Vo=n("li"),Ci=r("single sequence: "),Wn=n("code"),ji=r("<s> X </s>"),Ui=c(),Bo=n("li"),xi=r("pair of sequences: "),Vn=n("code"),qi=r("<s> A </s></s> B </s>"),Ji=c(),We=n("div"),b(Wt.$$.fragment),Ei=c(),Bn=n("p"),Ii=r("Converts a sequence of tokens (string) in a single string."),Wi=c(),Ve=n("div"),b(Vt.$$.fragment),Vi=c(),Zn=n("p"),Bi=r(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. MVP does not
make use of token type ids, therefore a list of zeros is returned.`),Zi=c(),Be=n("div"),b(Bt.$$.fragment),Gi=c(),Zt=n("p"),Ri=r(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Gn=n("code"),Pi=r("prepare_for_model"),Ai=r(" method."),Os=c(),ge=n("h2"),Ze=n("a"),Rn=n("span"),b(Gt.$$.fragment),Ni=c(),Pn=n("span"),Si=r("MvpTokenizerFast"),Ys=c(),U=n("div"),b(Rt.$$.fragment),Xi=c(),Pt=n("p"),Qi=r("Construct a \u201Cfast\u201D MVP tokenizer (backed by HuggingFace\u2019s "),An=n("em"),Li=r("tokenizers"),Hi=r(` library), derived from the GPT-2 tokenizer,
using byte-level Byte-Pair-Encoding.`),Oi=c(),Nn=n("p"),Yi=r("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Di=c(),b(Ge.$$.fragment),Ki=c(),At=n("p"),ed=r("You can get around that behavior by passing "),Sn=n("code"),td=r("add_prefix_space=True"),od=r(` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),nd=c(),b(Re.$$.fragment),sd=c(),Nt=n("p"),ad=r("This tokenizer inherits from "),Zo=n("a"),rd=r("PreTrainedTokenizerFast"),id=r(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),dd=c(),Pe=n("div"),b(St.$$.fragment),ld=c(),Xn=n("p"),cd=r(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. MVP does not
make use of token type ids, therefore a list of zeros is returned.`),Ds=c(),_e=n("h2"),Ae=n("a"),Qn=n("span"),b(Xt.$$.fragment),pd=c(),Ln=n("span"),hd=r("MvpModel"),Ks=c(),S=n("div"),b(Qt.$$.fragment),md=c(),Lt=n("p"),ud=r(`The bare MVP Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Go=n("a"),fd=r("PreTrainedModel"),gd=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),_d=c(),Ht=n("p"),vd=r("This model is also a PyTorch "),Ot=n("a"),bd=r("torch.nn.Module"),yd=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),kd=c(),O=n("div"),b(Yt.$$.fragment),Md=c(),ve=n("p"),wd=r("The "),Ro=n("a"),Td=r("MvpModel"),$d=r(" forward method, overrides the "),Hn=n("code"),zd=r("__call__"),Fd=r(" special method."),Cd=c(),b(Ne.$$.fragment),jd=c(),b(Se.$$.fragment),ea=c(),be=n("h2"),Xe=n("a"),On=n("span"),b(Dt.$$.fragment),Ud=c(),Yn=n("span"),xd=r("MvpForConditionalGeneration"),ta=c(),X=n("div"),b(Kt.$$.fragment),qd=c(),eo=n("p"),Jd=r(`The MVP Model with a language modeling head. Can be used for various text generation tasks.
This model inherits from `),Po=n("a"),Ed=r("PreTrainedModel"),Id=r(`. 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.)`),Wd=c(),to=n("p"),Vd=r("This model is also a PyTorch "),oo=n("a"),Bd=r("torch.nn.Module"),Zd=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Gd=c(),x=n("div"),b(no.$$.fragment),Rd=c(),ye=n("p"),Pd=r("The "),Ao=n("a"),Ad=r("MvpForConditionalGeneration"),Nd=r(" forward method, overrides the "),Dn=n("code"),Sd=r("__call__"),Xd=r(" special method."),Qd=c(),b(Qe.$$.fragment),Ld=c(),Kn=n("p"),Hd=r("Example of summarization:"),Od=c(),es=n("p"),Yd=r("Fine-tuning a model"),Dd=c(),b(Le.$$.fragment),Kd=c(),ts=n("p"),el=r("Inference after the model fine-tuned"),tl=c(),b(He.$$.fragment),oa=c(),ke=n("h2"),Oe=n("a"),os=n("span"),b(so.$$.fragment),ol=c(),ns=n("span"),nl=r("MvpForSequenceClassification"),na=c(),G=n("div"),b(ao.$$.fragment),sl=c(),ss=n("p"),al=r(`Mvp model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),rl=c(),ro=n("p"),il=r("This model inherits from "),No=n("a"),dl=r("PreTrainedModel"),ll=r(`. 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.)`),cl=c(),io=n("p"),pl=r("This model is also a PyTorch "),lo=n("a"),hl=r("torch.nn.Module"),ml=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ul=c(),q=n("div"),b(co.$$.fragment),fl=c(),Me=n("p"),gl=r("The "),So=n("a"),_l=r("MvpForSequenceClassification"),vl=r(" forward method, overrides the "),as=n("code"),bl=r("__call__"),yl=r(" special method."),kl=c(),b(Ye.$$.fragment),Ml=c(),rs=n("p"),wl=r("Example of single-label classification:"),Tl=c(),po=n("p"),$l=r("Fine-tuning a model on "),is=n("code"),zl=r("num_labels"),Fl=r(" classes"),Cl=c(),b(De.$$.fragment),jl=c(),ds=n("p"),Ul=r("Inference after the model fine-tuned"),xl=c(),b(Ke.$$.fragment),sa=c(),we=n("h2"),et=n("a"),ls=n("span"),b(ho.$$.fragment),ql=c(),cs=n("span"),Jl=r("MvpForQuestionAnswering"),aa=c(),R=n("div"),b(mo.$$.fragment),El=c(),Te=n("p"),Il=r(`MVP Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear layer
on top of the hidden-states output to compute `),ps=n("code"),Wl=r("span start logits"),Vl=r(" and "),hs=n("code"),Bl=r("span end logits"),Zl=r(")."),Gl=c(),uo=n("p"),Rl=r("This model inherits from "),Xo=n("a"),Pl=r("PreTrainedModel"),Al=r(`. 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=c(),fo=n("p"),Sl=r("This model is also a PyTorch "),go=n("a"),Xl=r("torch.nn.Module"),Ql=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ll=c(),J=n("div"),b(_o.$$.fragment),Hl=c(),$e=n("p"),Ol=r("The "),Qo=n("a"),Yl=r("MvpForQuestionAnswering"),Dl=r(" forward method, overrides the "),ms=n("code"),Kl=r("__call__"),ec=r(" special method."),tc=c(),b(tt.$$.fragment),oc=c(),us=n("p"),nc=r("Example:"),sc=c(),Lo=n("p"),ac=r(`Fine-tuning a model for extrative question answering, and our model also supports generative question answering
using `),fs=n("code"),rc=r("BartForConditionalGeneration"),ic=c(),b(ot.$$.fragment),dc=c(),gs=n("p"),lc=r("Inference after the model fine-tuned"),cc=c(),b(nt.$$.fragment),ra=c(),ze=n("h2"),st=n("a"),_s=n("span"),b(vo.$$.fragment),pc=c(),vs=n("span"),hc=r("MvpForCausalLM"),ia=c(),Fe=n("div"),b(bo.$$.fragment),mc=c(),at=n("div"),b(yo.$$.fragment),uc=c(),b(rt.$$.fragment),this.h()},l(t){const u=hh('[data-svelte="svelte-1phssyn"]',document.head);d=s(u,"META",{name:!0,content:!0}),u.forEach(o),g=p(t),l=s(t,"H1",{class:!0});var ko=a(l);f=s(ko,"A",{id:!0,class:!0,href:!0});var bs=a(f);$=s(bs,"SPAN",{});var ys=a($);y(h.$$.fragment,ys),ys.forEach(o),bs.forEach(o),_=p(ko),C=s(ko,"SPAN",{});var ks=a(C);de=i(ks,"MVP"),ks.forEach(o),ko.forEach(o),A=p(t),Q=s(t,"H2",{class:!0});var Mo=a(Q);K=s(Mo,"A",{id:!0,class:!0,href:!0});var Ms=a(K);dn=s(Ms,"SPAN",{});var ws=a(dn);y(ht.$$.fragment,ws),ws.forEach(o),Ms.forEach(o),Na=p(Mo),ln=s(Mo,"SPAN",{});var Ts=a(ln);Sa=i(Ts,"Overview"),Ts.forEach(o),Mo.forEach(o),qs=p(t),Ce=s(t,"P",{});var wo=a(Ce);Xa=i(wo,"The MVP model was proposed in "),mt=s(wo,"A",{href:!0,rel:!0});var $s=a(mt);Qa=i($s,"MVP: Multi-task Supervised Pre-training for Natural Language Generation"),$s.forEach(o),La=i(wo," by Tianyi Tang, Junyi Li, Wayne Xin Zhao and Ji-Rong Wen."),wo.forEach(o),Js=p(t),To=s(t,"P",{});var zs=a(To);Ha=i(zs,"According to the abstract,"),zs.forEach(o),Es=p(t),L=s(t,"UL",{});var ee=a(L);cn=s(ee,"LI",{});var Fs=a(cn);Oa=i(Fs,"MVP follows a standard Transformer encoder-decoder architecture."),Fs.forEach(o),Ya=p(ee),pn=s(ee,"LI",{});var Cs=a(pn);Da=i(Cs,"MVP is supervised pre-trained using labeled datasets."),Cs.forEach(o),Ka=p(ee),hn=s(ee,"LI",{});var js=a(hn);er=i(js,"MVP also has task-specific soft prompts to stimulate the model\u2019s capacity in performing a certain task."),js.forEach(o),tr=p(ee),mn=s(ee,"LI",{});var Us=a(mn);or=i(Us,"MVP is specially designed for natural language generation and can be adapted to a wide range of generation tasks, including but not limited to summarization, data-to-text generation, open-ended dialogue system, story generation, question answering, question generation, task-oriented dialogue system, commonsense generation, paraphrase generation, text style transfer, and text simplification. Our model can also be adapted to natural language understanding tasks such as sequence classification and (extractive) question answering."),Us.forEach(o),ee.forEach(o),Is=p(t),$o=s(t,"P",{});var xs=a($o);nr=i(xs,"Tips:"),xs.forEach(o),Ws=p(t),H=s(t,"UL",{});var it=a(H);ut=s(it,"LI",{});var la=a(ut);sr=i(la,"We have released a series of models "),ft=s(la,"A",{href:!0,rel:!0});var vc=a(ft);ar=i(vc,"here"),vc.forEach(o),rr=i(la,", including MVP, MVP with task-specific prompts, and multi-task pre-trained variants."),la.forEach(o),ir=p(it),gt=s(it,"LI",{});var ca=a(gt);dr=i(ca,"If you want to use a model without prompts (standard Transformer), you can load it through "),un=s(ca,"CODE",{});var bc=a(un);lr=i(bc,"MvpForConditionalGeneration.from_pretrained('RUCAIBox/mvp')"),bc.forEach(o),cr=i(ca,"."),ca.forEach(o),pr=p(it),_t=s(it,"LI",{});var pa=a(_t);hr=i(pa,"If you want to use a model with task-specific prompts, such as summarization, you can load it through "),fn=s(pa,"CODE",{});var yc=a(fn);mr=i(yc,"MvpForConditionalGeneration.from_pretrained('RUCAIBox/mvp-summarization')"),yc.forEach(o),ur=i(pa,"."),pa.forEach(o),fr=p(it),le=s(it,"LI",{});var Ho=a(le);gr=i(Ho,"Our model supports lightweight prompt tuning following "),vt=s(Ho,"A",{href:!0,rel:!0});var kc=a(vt);_r=i(kc,"Prefix-tuning"),kc.forEach(o),vr=i(Ho," with method "),gn=s(Ho,"CODE",{});var Mc=a(gn);br=i(Mc,"set_lightweight_tuning()"),Mc.forEach(o),yr=i(Ho,"."),Ho.forEach(o),it.forEach(o),Vs=p(t),ne=s(t,"P",{});var Oo=a(ne);kr=i(Oo,"This model was contributed by "),bt=s(Oo,"A",{href:!0,rel:!0});var wc=a(bt);Mr=i(wc,"Tianyi Tang"),wc.forEach(o),wr=i(Oo,". The detailed information and instructions can be found "),yt=s(Oo,"A",{href:!0,rel:!0});var Tc=a(yt);Tr=i(Tc,"here"),Tc.forEach(o),$r=i(Oo,"."),Oo.forEach(o),Bs=p(t),ce=s(t,"H2",{class:!0});var ha=a(ce);je=s(ha,"A",{id:!0,class:!0,href:!0});var $c=a(je);_n=s($c,"SPAN",{});var zc=a(_n);y(kt.$$.fragment,zc),zc.forEach(o),$c.forEach(o),zr=p(ha),vn=s(ha,"SPAN",{});var Fc=a(vn);Fr=i(Fc,"Examples"),Fc.forEach(o),ha.forEach(o),Zs=i(t,`

For summarization, it is an example to use MVP and MVP with summarization-specific prompts.

	`),y(Mt.$$.fragment,t),Gs=p(t),zo=s(t,"P",{});var Cc=a(zo);Cr=i(Cc,"For data-to-text generation, it is an example to use MVP and multi-task pre-trained variants."),Cc.forEach(o),Rs=p(t),y(wt.$$.fragment,t),Ps=p(t),se=s(t,"P",{});var Yo=a(se);jr=i(Yo,"For lightweight tuning, "),bn=s(Yo,"EM",{});var jc=a(bn);Ur=i(jc,"i.e."),jc.forEach(o),xr=i(Yo,", fixing the model and only tuning prompts, you can load MVP with randomly initialized prompts or with task-specific prompts. Our code also supports Prefix-tuning with BART following the "),Tt=s(Yo,"A",{href:!0,rel:!0});var Uc=a(Tt);qr=i(Uc,"original paper"),Uc.forEach(o),Jr=i(Yo,"."),Yo.forEach(o),As=p(t),y($t.$$.fragment,t),Ns=p(t),pe=s(t,"H2",{class:!0});var ma=a(pe);Ue=s(ma,"A",{id:!0,class:!0,href:!0});var xc=a(Ue);yn=s(xc,"SPAN",{});var qc=a(yn);y(zt.$$.fragment,qc),qc.forEach(o),xc.forEach(o),Er=p(ma),kn=s(ma,"SPAN",{});var Jc=a(kn);Ir=i(Jc,"Documentation resources"),Jc.forEach(o),ma.forEach(o),Ss=p(t),I=s(t,"UL",{});var Y=a(I);Mn=s(Y,"LI",{});var Ec=a(Mn);Fo=s(Ec,"A",{href:!0});var Ic=a(Fo);Wr=i(Ic,"Text classification task guide"),Ic.forEach(o),Ec.forEach(o),Vr=p(Y),wn=s(Y,"LI",{});var Wc=a(wn);Co=s(Wc,"A",{href:!0});var Vc=a(Co);Br=i(Vc,"Question answering task guide"),Vc.forEach(o),Wc.forEach(o),Zr=p(Y),Tn=s(Y,"LI",{});var Bc=a(Tn);jo=s(Bc,"A",{href:!0});var Zc=a(jo);Gr=i(Zc,"Causal language modeling task guide"),Zc.forEach(o),Bc.forEach(o),Rr=p(Y),$n=s(Y,"LI",{});var Gc=a($n);Uo=s(Gc,"A",{href:!0});var Rc=a(Uo);Pr=i(Rc,"Masked language modeling task guide"),Rc.forEach(o),Gc.forEach(o),Ar=p(Y),zn=s(Y,"LI",{});var Pc=a(zn);xo=s(Pc,"A",{href:!0});var Ac=a(xo);Nr=i(Ac,"Translation task guide"),Ac.forEach(o),Pc.forEach(o),Sr=p(Y),Fn=s(Y,"LI",{});var Nc=a(Fn);qo=s(Nc,"A",{href:!0});var Sc=a(qo);Xr=i(Sc,"Summarization task guide"),Sc.forEach(o),Nc.forEach(o),Y.forEach(o),Xs=p(t),he=s(t,"H2",{class:!0});var ua=a(he);xe=s(ua,"A",{id:!0,class:!0,href:!0});var Xc=a(xe);Cn=s(Xc,"SPAN",{});var Qc=a(Cn);y(Ft.$$.fragment,Qc),Qc.forEach(o),Xc.forEach(o),Qr=p(ua),jn=s(ua,"SPAN",{});var Lc=a(jn);Lr=i(Lc,"MvpConfig"),Lc.forEach(o),ua.forEach(o),Qs=p(t),N=s(t,"DIV",{class:!0});var dt=a(N);y(Ct.$$.fragment,dt),Hr=p(dt),me=s(dt,"P",{});var Do=a(me);Or=i(Do,"This is the configuration class to store the configuration of a "),Jo=s(Do,"A",{href:!0});var Hc=a(Jo);Yr=i(Hc,"MvpModel"),Hc.forEach(o),Dr=i(Do,`. It is used to instantiate a MVP 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 MVP `),jt=s(Do,"A",{href:!0,rel:!0});var Oc=a(jt);Kr=i(Oc,"RUCAIBox/mvp"),Oc.forEach(o),ei=i(Do,`
architecture.`),Do.forEach(o),ti=p(dt),ue=s(dt,"P",{});var Ko=a(ue);oi=i(Ko,"Configuration objects inherit from "),Eo=s(Ko,"A",{href:!0});var Yc=a(Eo);ni=i(Yc,"PretrainedConfig"),Yc.forEach(o),si=i(Ko,` and can be used to control the model outputs. Read the
documentation from `),Io=s(Ko,"A",{href:!0});var Dc=a(Io);ai=i(Dc,"PretrainedConfig"),Dc.forEach(o),ri=i(Ko," for more information."),Ko.forEach(o),ii=p(dt),y(qe.$$.fragment,dt),dt.forEach(o),Ls=p(t),fe=s(t,"H2",{class:!0});var fa=a(fe);Je=s(fa,"A",{id:!0,class:!0,href:!0});var Kc=a(Je);Un=s(Kc,"SPAN",{});var ep=a(Un);y(Ut.$$.fragment,ep),ep.forEach(o),Kc.forEach(o),di=p(fa),xn=s(fa,"SPAN",{});var tp=a(xn);li=i(tp,"MvpTokenizer"),tp.forEach(o),fa.forEach(o),Hs=p(t),F=s(t,"DIV",{class:!0});var j=a(F);y(xt.$$.fragment,j),ci=p(j),qn=s(j,"P",{});var op=a(qn);pi=i(op,"Constructs a MVP tokenizer, which is smilar to the RoBERTa tokenizer, using byte-level Byte-Pair-Encoding."),op.forEach(o),hi=p(j),Jn=s(j,"P",{});var np=a(Jn);mi=i(np,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),np.forEach(o),ui=p(j),y(Ee.$$.fragment,j),fi=p(j),qt=s(j,"P",{});var ga=a(qt);gi=i(ga,"You can get around that behavior by passing "),En=s(ga,"CODE",{});var sp=a(En);_i=i(sp,"add_prefix_space=True"),sp.forEach(o),vi=i(ga,` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),ga.forEach(o),bi=p(j),y(Ie.$$.fragment,j),yi=p(j),Jt=s(j,"P",{});var _a=a(Jt);ki=i(_a,"This tokenizer inherits from "),Wo=s(_a,"A",{href:!0});var ap=a(Wo);Mi=i(ap,"PreTrainedTokenizer"),ap.forEach(o),wi=i(_a,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),_a.forEach(o),Ti=p(j),ae=s(j,"DIV",{class:!0});var en=a(ae);y(Et.$$.fragment,en),$i=p(en),In=s(en,"P",{});var rp=a(In);zi=i(rp,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A MVP sequence has the following format:`),rp.forEach(o),Fi=p(en),It=s(en,"UL",{});var va=a(It);Vo=s(va,"LI",{});var fc=a(Vo);Ci=i(fc,"single sequence: "),Wn=s(fc,"CODE",{});var ip=a(Wn);ji=i(ip,"<s> X </s>"),ip.forEach(o),fc.forEach(o),Ui=p(va),Bo=s(va,"LI",{});var gc=a(Bo);xi=i(gc,"pair of sequences: "),Vn=s(gc,"CODE",{});var dp=a(Vn);qi=i(dp,"<s> A </s></s> B </s>"),dp.forEach(o),gc.forEach(o),va.forEach(o),en.forEach(o),Ji=p(j),We=s(j,"DIV",{class:!0});var ba=a(We);y(Wt.$$.fragment,ba),Ei=p(ba),Bn=s(ba,"P",{});var lp=a(Bn);Ii=i(lp,"Converts a sequence of tokens (string) in a single string."),lp.forEach(o),ba.forEach(o),Wi=p(j),Ve=s(j,"DIV",{class:!0});var ya=a(Ve);y(Vt.$$.fragment,ya),Vi=p(ya),Zn=s(ya,"P",{});var cp=a(Zn);Bi=i(cp,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. MVP does not
make use of token type ids, therefore a list of zeros is returned.`),cp.forEach(o),ya.forEach(o),Zi=p(j),Be=s(j,"DIV",{class:!0});var ka=a(Be);y(Bt.$$.fragment,ka),Gi=p(ka),Zt=s(ka,"P",{});var Ma=a(Zt);Ri=i(Ma,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Gn=s(Ma,"CODE",{});var pp=a(Gn);Pi=i(pp,"prepare_for_model"),pp.forEach(o),Ai=i(Ma," method."),Ma.forEach(o),ka.forEach(o),j.forEach(o),Os=p(t),ge=s(t,"H2",{class:!0});var wa=a(ge);Ze=s(wa,"A",{id:!0,class:!0,href:!0});var hp=a(Ze);Rn=s(hp,"SPAN",{});var mp=a(Rn);y(Gt.$$.fragment,mp),mp.forEach(o),hp.forEach(o),Ni=p(wa),Pn=s(wa,"SPAN",{});var up=a(Pn);Si=i(up,"MvpTokenizerFast"),up.forEach(o),wa.forEach(o),Ys=p(t),U=s(t,"DIV",{class:!0});var W=a(U);y(Rt.$$.fragment,W),Xi=p(W),Pt=s(W,"P",{});var Ta=a(Pt);Qi=i(Ta,"Construct a \u201Cfast\u201D MVP tokenizer (backed by HuggingFace\u2019s "),An=s(Ta,"EM",{});var fp=a(An);Li=i(fp,"tokenizers"),fp.forEach(o),Hi=i(Ta,` library), derived from the GPT-2 tokenizer,
using byte-level Byte-Pair-Encoding.`),Ta.forEach(o),Oi=p(W),Nn=s(W,"P",{});var gp=a(Nn);Yi=i(gp,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),gp.forEach(o),Di=p(W),y(Ge.$$.fragment,W),Ki=p(W),At=s(W,"P",{});var $a=a(At);ed=i($a,"You can get around that behavior by passing "),Sn=s($a,"CODE",{});var _p=a(Sn);td=i(_p,"add_prefix_space=True"),_p.forEach(o),od=i($a,` when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`),$a.forEach(o),nd=p(W),y(Re.$$.fragment,W),sd=p(W),Nt=s(W,"P",{});var za=a(Nt);ad=i(za,"This tokenizer inherits from "),Zo=s(za,"A",{href:!0});var vp=a(Zo);rd=i(vp,"PreTrainedTokenizerFast"),vp.forEach(o),id=i(za,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),za.forEach(o),dd=p(W),Pe=s(W,"DIV",{class:!0});var Fa=a(Pe);y(St.$$.fragment,Fa),ld=p(Fa),Xn=s(Fa,"P",{});var bp=a(Xn);cd=i(bp,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. MVP does not
make use of token type ids, therefore a list of zeros is returned.`),bp.forEach(o),Fa.forEach(o),W.forEach(o),Ds=p(t),_e=s(t,"H2",{class:!0});var Ca=a(_e);Ae=s(Ca,"A",{id:!0,class:!0,href:!0});var yp=a(Ae);Qn=s(yp,"SPAN",{});var kp=a(Qn);y(Xt.$$.fragment,kp),kp.forEach(o),yp.forEach(o),pd=p(Ca),Ln=s(Ca,"SPAN",{});var Mp=a(Ln);hd=i(Mp,"MvpModel"),Mp.forEach(o),Ca.forEach(o),Ks=p(t),S=s(t,"DIV",{class:!0});var lt=a(S);y(Qt.$$.fragment,lt),md=p(lt),Lt=s(lt,"P",{});var ja=a(Lt);ud=i(ja,`The bare MVP Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Go=s(ja,"A",{href:!0});var wp=a(Go);fd=i(wp,"PreTrainedModel"),wp.forEach(o),gd=i(ja,`. 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.)`),ja.forEach(o),_d=p(lt),Ht=s(lt,"P",{});var Ua=a(Ht);vd=i(Ua,"This model is also a PyTorch "),Ot=s(Ua,"A",{href:!0,rel:!0});var Tp=a(Ot);bd=i(Tp,"torch.nn.Module"),Tp.forEach(o),yd=i(Ua,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ua.forEach(o),kd=p(lt),O=s(lt,"DIV",{class:!0});var ct=a(O);y(Yt.$$.fragment,ct),Md=p(ct),ve=s(ct,"P",{});var tn=a(ve);wd=i(tn,"The "),Ro=s(tn,"A",{href:!0});var $p=a(Ro);Td=i($p,"MvpModel"),$p.forEach(o),$d=i(tn," forward method, overrides the "),Hn=s(tn,"CODE",{});var zp=a(Hn);zd=i(zp,"__call__"),zp.forEach(o),Fd=i(tn," special method."),tn.forEach(o),Cd=p(ct),y(Ne.$$.fragment,ct),jd=p(ct),y(Se.$$.fragment,ct),ct.forEach(o),lt.forEach(o),ea=p(t),be=s(t,"H2",{class:!0});var xa=a(be);Xe=s(xa,"A",{id:!0,class:!0,href:!0});var Fp=a(Xe);On=s(Fp,"SPAN",{});var Cp=a(On);y(Dt.$$.fragment,Cp),Cp.forEach(o),Fp.forEach(o),Ud=p(xa),Yn=s(xa,"SPAN",{});var jp=a(Yn);xd=i(jp,"MvpForConditionalGeneration"),jp.forEach(o),xa.forEach(o),ta=p(t),X=s(t,"DIV",{class:!0});var pt=a(X);y(Kt.$$.fragment,pt),qd=p(pt),eo=s(pt,"P",{});var qa=a(eo);Jd=i(qa,`The MVP Model with a language modeling head. Can be used for various text generation tasks.
This model inherits from `),Po=s(qa,"A",{href:!0});var Up=a(Po);Ed=i(Up,"PreTrainedModel"),Up.forEach(o),Id=i(qa,`. 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.)`),qa.forEach(o),Wd=p(pt),to=s(pt,"P",{});var Ja=a(to);Vd=i(Ja,"This model is also a PyTorch "),oo=s(Ja,"A",{href:!0,rel:!0});var xp=a(oo);Bd=i(xp,"torch.nn.Module"),xp.forEach(o),Zd=i(Ja,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ja.forEach(o),Gd=p(pt),x=s(pt,"DIV",{class:!0});var V=a(x);y(no.$$.fragment,V),Rd=p(V),ye=s(V,"P",{});var on=a(ye);Pd=i(on,"The "),Ao=s(on,"A",{href:!0});var qp=a(Ao);Ad=i(qp,"MvpForConditionalGeneration"),qp.forEach(o),Nd=i(on," forward method, overrides the "),Dn=s(on,"CODE",{});var Jp=a(Dn);Sd=i(Jp,"__call__"),Jp.forEach(o),Xd=i(on," special method."),on.forEach(o),Qd=p(V),y(Qe.$$.fragment,V),Ld=p(V),Kn=s(V,"P",{});var Ep=a(Kn);Hd=i(Ep,"Example of summarization:"),Ep.forEach(o),Od=p(V),es=s(V,"P",{});var Ip=a(es);Yd=i(Ip,"Fine-tuning a model"),Ip.forEach(o),Dd=p(V),y(Le.$$.fragment,V),Kd=p(V),ts=s(V,"P",{});var Wp=a(ts);el=i(Wp,"Inference after the model fine-tuned"),Wp.forEach(o),tl=p(V),y(He.$$.fragment,V),V.forEach(o),pt.forEach(o),oa=p(t),ke=s(t,"H2",{class:!0});var Ea=a(ke);Oe=s(Ea,"A",{id:!0,class:!0,href:!0});var Vp=a(Oe);os=s(Vp,"SPAN",{});var Bp=a(os);y(so.$$.fragment,Bp),Bp.forEach(o),Vp.forEach(o),ol=p(Ea),ns=s(Ea,"SPAN",{});var Zp=a(ns);nl=i(Zp,"MvpForSequenceClassification"),Zp.forEach(o),Ea.forEach(o),na=p(t),G=s(t,"DIV",{class:!0});var re=a(G);y(ao.$$.fragment,re),sl=p(re),ss=s(re,"P",{});var Gp=a(ss);al=i(Gp,`Mvp model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),Gp.forEach(o),rl=p(re),ro=s(re,"P",{});var Ia=a(ro);il=i(Ia,"This model inherits from "),No=s(Ia,"A",{href:!0});var Rp=a(No);dl=i(Rp,"PreTrainedModel"),Rp.forEach(o),ll=i(Ia,`. 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.)`),Ia.forEach(o),cl=p(re),io=s(re,"P",{});var Wa=a(io);pl=i(Wa,"This model is also a PyTorch "),lo=s(Wa,"A",{href:!0,rel:!0});var Pp=a(lo);hl=i(Pp,"torch.nn.Module"),Pp.forEach(o),ml=i(Wa,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Wa.forEach(o),ul=p(re),q=s(re,"DIV",{class:!0});var B=a(q);y(co.$$.fragment,B),fl=p(B),Me=s(B,"P",{});var nn=a(Me);gl=i(nn,"The "),So=s(nn,"A",{href:!0});var Ap=a(So);_l=i(Ap,"MvpForSequenceClassification"),Ap.forEach(o),vl=i(nn," forward method, overrides the "),as=s(nn,"CODE",{});var Np=a(as);bl=i(Np,"__call__"),Np.forEach(o),yl=i(nn," special method."),nn.forEach(o),kl=p(B),y(Ye.$$.fragment,B),Ml=p(B),rs=s(B,"P",{});var Sp=a(rs);wl=i(Sp,"Example of single-label classification:"),Sp.forEach(o),Tl=p(B),po=s(B,"P",{});var Va=a(po);$l=i(Va,"Fine-tuning a model on "),is=s(Va,"CODE",{});var Xp=a(is);zl=i(Xp,"num_labels"),Xp.forEach(o),Fl=i(Va," classes"),Va.forEach(o),Cl=p(B),y(De.$$.fragment,B),jl=p(B),ds=s(B,"P",{});var Qp=a(ds);Ul=i(Qp,"Inference after the model fine-tuned"),Qp.forEach(o),xl=p(B),y(Ke.$$.fragment,B),B.forEach(o),re.forEach(o),sa=p(t),we=s(t,"H2",{class:!0});var Ba=a(we);et=s(Ba,"A",{id:!0,class:!0,href:!0});var Lp=a(et);ls=s(Lp,"SPAN",{});var Hp=a(ls);y(ho.$$.fragment,Hp),Hp.forEach(o),Lp.forEach(o),ql=p(Ba),cs=s(Ba,"SPAN",{});var Op=a(cs);Jl=i(Op,"MvpForQuestionAnswering"),Op.forEach(o),Ba.forEach(o),aa=p(t),R=s(t,"DIV",{class:!0});var ie=a(R);y(mo.$$.fragment,ie),El=p(ie),Te=s(ie,"P",{});var sn=a(Te);Il=i(sn,`MVP Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear layer
on top of the hidden-states output to compute `),ps=s(sn,"CODE",{});var Yp=a(ps);Wl=i(Yp,"span start logits"),Yp.forEach(o),Vl=i(sn," and "),hs=s(sn,"CODE",{});var Dp=a(hs);Bl=i(Dp,"span end logits"),Dp.forEach(o),Zl=i(sn,")."),sn.forEach(o),Gl=p(ie),uo=s(ie,"P",{});var Za=a(uo);Rl=i(Za,"This model inherits from "),Xo=s(Za,"A",{href:!0});var Kp=a(Xo);Pl=i(Kp,"PreTrainedModel"),Kp.forEach(o),Al=i(Za,`. 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.)`),Za.forEach(o),Nl=p(ie),fo=s(ie,"P",{});var Ga=a(fo);Sl=i(Ga,"This model is also a PyTorch "),go=s(Ga,"A",{href:!0,rel:!0});var eh=a(go);Xl=i(eh,"torch.nn.Module"),eh.forEach(o),Ql=i(Ga,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ga.forEach(o),Ll=p(ie),J=s(ie,"DIV",{class:!0});var Z=a(J);y(_o.$$.fragment,Z),Hl=p(Z),$e=s(Z,"P",{});var an=a($e);Ol=i(an,"The "),Qo=s(an,"A",{href:!0});var th=a(Qo);Yl=i(th,"MvpForQuestionAnswering"),th.forEach(o),Dl=i(an," forward method, overrides the "),ms=s(an,"CODE",{});var oh=a(ms);Kl=i(oh,"__call__"),oh.forEach(o),ec=i(an," special method."),an.forEach(o),tc=p(Z),y(tt.$$.fragment,Z),oc=p(Z),us=s(Z,"P",{});var nh=a(us);nc=i(nh,"Example:"),nh.forEach(o),sc=p(Z),Lo=s(Z,"P",{});var _c=a(Lo);ac=i(_c,`Fine-tuning a model for extrative question answering, and our model also supports generative question answering
using `),fs=s(_c,"CODE",{});var sh=a(fs);rc=i(sh,"BartForConditionalGeneration"),sh.forEach(o),_c.forEach(o),ic=p(Z),y(ot.$$.fragment,Z),dc=p(Z),gs=s(Z,"P",{});var ah=a(gs);lc=i(ah,"Inference after the model fine-tuned"),ah.forEach(o),cc=p(Z),y(nt.$$.fragment,Z),Z.forEach(o),ie.forEach(o),ra=p(t),ze=s(t,"H2",{class:!0});var Ra=a(ze);st=s(Ra,"A",{id:!0,class:!0,href:!0});var rh=a(st);_s=s(rh,"SPAN",{});var ih=a(_s);y(vo.$$.fragment,ih),ih.forEach(o),rh.forEach(o),pc=p(Ra),vs=s(Ra,"SPAN",{});var dh=a(vs);hc=i(dh,"MvpForCausalLM"),dh.forEach(o),Ra.forEach(o),ia=p(t),Fe=s(t,"DIV",{class:!0});var Pa=a(Fe);y(bo.$$.fragment,Pa),mc=p(Pa),at=s(Pa,"DIV",{class:!0});var Aa=a(at);y(yo.$$.fragment,Aa),uc=p(Aa),y(rt.$$.fragment,Aa),Aa.forEach(o),Pa.forEach(o),this.h()},h(){m(d,"name","hf:doc:metadata"),m(d,"content",JSON.stringify(qh)),m(f,"id","mvp"),m(f,"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"),m(f,"href","#mvp"),m(l,"class","relative group"),m(K,"id","overview"),m(K,"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"),m(K,"href","#overview"),m(Q,"class","relative group"),m(mt,"href","https://arxiv.org/abs/2206.12131"),m(mt,"rel","nofollow"),m(ft,"href","https://huggingface.co/models?filter=mvp"),m(ft,"rel","nofollow"),m(vt,"href","https://arxiv.org/abs/2101.00190"),m(vt,"rel","nofollow"),m(bt,"href","https://huggingface.co/StevenTang"),m(bt,"rel","nofollow"),m(yt,"href","https://github.com/RUCAIBox/MVP"),m(yt,"rel","nofollow"),m(je,"id","examples"),m(je,"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"),m(je,"href","#examples"),m(ce,"class","relative group"),m(Tt,"href","https://arxiv.org/abs/2101.00190"),m(Tt,"rel","nofollow"),m(Ue,"id","documentation-resources"),m(Ue,"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"),m(Ue,"href","#documentation-resources"),m(pe,"class","relative group"),m(Fo,"href","../tasks/sequence_classification"),m(Co,"href","../tasks/question_answering"),m(jo,"href","../tasks/language_modeling"),m(Uo,"href","../tasks/masked_language_modeling"),m(xo,"href","../tasks/translation"),m(qo,"href","../tasks/summarization"),m(xe,"id","transformers.MvpConfig"),m(xe,"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"),m(xe,"href","#transformers.MvpConfig"),m(he,"class","relative group"),m(Jo,"href","/docs/transformers/main/en/model_doc/mvp#transformers.MvpModel"),m(jt,"href","https://huggingface.co/RUCAIBox/mvp"),m(jt,"rel","nofollow"),m(Eo,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),m(Io,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),m(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Je,"id","transformers.MvpTokenizer"),m(Je,"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"),m(Je,"href","#transformers.MvpTokenizer"),m(fe,"class","relative group"),m(Wo,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),m(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ze,"id","transformers.MvpTokenizerFast"),m(Ze,"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"),m(Ze,"href","#transformers.MvpTokenizerFast"),m(ge,"class","relative group"),m(Zo,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),m(Pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ae,"id","transformers.MvpModel"),m(Ae,"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"),m(Ae,"href","#transformers.MvpModel"),m(_e,"class","relative group"),m(Go,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),m(Ot,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Ot,"rel","nofollow"),m(Ro,"href","/docs/transformers/main/en/model_doc/mvp#transformers.MvpModel"),m(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Xe,"id","transformers.MvpForConditionalGeneration"),m(Xe,"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"),m(Xe,"href","#transformers.MvpForConditionalGeneration"),m(be,"class","relative group"),m(Po,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),m(oo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(oo,"rel","nofollow"),m(Ao,"href","/docs/transformers/main/en/model_doc/mvp#transformers.MvpForConditionalGeneration"),m(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Oe,"id","transformers.MvpForSequenceClassification"),m(Oe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Oe,"href","#transformers.MvpForSequenceClassification"),m(ke,"class","relative group"),m(No,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),m(lo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(lo,"rel","nofollow"),m(So,"href","/docs/transformers/main/en/model_doc/mvp#transformers.MvpForSequenceClassification"),m(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(et,"id","transformers.MvpForQuestionAnswering"),m(et,"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"),m(et,"href","#transformers.MvpForQuestionAnswering"),m(we,"class","relative group"),m(Xo,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),m(go,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(go,"rel","nofollow"),m(Qo,"href","/docs/transformers/main/en/model_doc/mvp#transformers.MvpForQuestionAnswering"),m(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(st,"id","transformers.MvpForCausalLM"),m(st,"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"),m(st,"href","#transformers.MvpForCausalLM"),m(ze,"class","relative group"),m(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,u){e(document.head,d),v(t,g,u),v(t,l,u),e(l,f),e(f,$),k(h,$,null),e(l,_),e(l,C),e(C,de),v(t,A,u),v(t,Q,u),e(Q,K),e(K,dn),k(ht,dn,null),e(Q,Na),e(Q,ln),e(ln,Sa),v(t,qs,u),v(t,Ce,u),e(Ce,Xa),e(Ce,mt),e(mt,Qa),e(Ce,La),v(t,Js,u),v(t,To,u),e(To,Ha),v(t,Es,u),v(t,L,u),e(L,cn),e(cn,Oa),e(L,Ya),e(L,pn),e(pn,Da),e(L,Ka),e(L,hn),e(hn,er),e(L,tr),e(L,mn),e(mn,or),v(t,Is,u),v(t,$o,u),e($o,nr),v(t,Ws,u),v(t,H,u),e(H,ut),e(ut,sr),e(ut,ft),e(ft,ar),e(ut,rr),e(H,ir),e(H,gt),e(gt,dr),e(gt,un),e(un,lr),e(gt,cr),e(H,pr),e(H,_t),e(_t,hr),e(_t,fn),e(fn,mr),e(_t,ur),e(H,fr),e(H,le),e(le,gr),e(le,vt),e(vt,_r),e(le,vr),e(le,gn),e(gn,br),e(le,yr),v(t,Vs,u),v(t,ne,u),e(ne,kr),e(ne,bt),e(bt,Mr),e(ne,wr),e(ne,yt),e(yt,Tr),e(ne,$r),v(t,Bs,u),v(t,ce,u),e(ce,je),e(je,_n),k(kt,_n,null),e(ce,zr),e(ce,vn),e(vn,Fr),v(t,Zs,u),k(Mt,t,u),v(t,Gs,u),v(t,zo,u),e(zo,Cr),v(t,Rs,u),k(wt,t,u),v(t,Ps,u),v(t,se,u),e(se,jr),e(se,bn),e(bn,Ur),e(se,xr),e(se,Tt),e(Tt,qr),e(se,Jr),v(t,As,u),k($t,t,u),v(t,Ns,u),v(t,pe,u),e(pe,Ue),e(Ue,yn),k(zt,yn,null),e(pe,Er),e(pe,kn),e(kn,Ir),v(t,Ss,u),v(t,I,u),e(I,Mn),e(Mn,Fo),e(Fo,Wr),e(I,Vr),e(I,wn),e(wn,Co),e(Co,Br),e(I,Zr),e(I,Tn),e(Tn,jo),e(jo,Gr),e(I,Rr),e(I,$n),e($n,Uo),e(Uo,Pr),e(I,Ar),e(I,zn),e(zn,xo),e(xo,Nr),e(I,Sr),e(I,Fn),e(Fn,qo),e(qo,Xr),v(t,Xs,u),v(t,he,u),e(he,xe),e(xe,Cn),k(Ft,Cn,null),e(he,Qr),e(he,jn),e(jn,Lr),v(t,Qs,u),v(t,N,u),k(Ct,N,null),e(N,Hr),e(N,me),e(me,Or),e(me,Jo),e(Jo,Yr),e(me,Dr),e(me,jt),e(jt,Kr),e(me,ei),e(N,ti),e(N,ue),e(ue,oi),e(ue,Eo),e(Eo,ni),e(ue,si),e(ue,Io),e(Io,ai),e(ue,ri),e(N,ii),k(qe,N,null),v(t,Ls,u),v(t,fe,u),e(fe,Je),e(Je,Un),k(Ut,Un,null),e(fe,di),e(fe,xn),e(xn,li),v(t,Hs,u),v(t,F,u),k(xt,F,null),e(F,ci),e(F,qn),e(qn,pi),e(F,hi),e(F,Jn),e(Jn,mi),e(F,ui),k(Ee,F,null),e(F,fi),e(F,qt),e(qt,gi),e(qt,En),e(En,_i),e(qt,vi),e(F,bi),k(Ie,F,null),e(F,yi),e(F,Jt),e(Jt,ki),e(Jt,Wo),e(Wo,Mi),e(Jt,wi),e(F,Ti),e(F,ae),k(Et,ae,null),e(ae,$i),e(ae,In),e(In,zi),e(ae,Fi),e(ae,It),e(It,Vo),e(Vo,Ci),e(Vo,Wn),e(Wn,ji),e(It,Ui),e(It,Bo),e(Bo,xi),e(Bo,Vn),e(Vn,qi),e(F,Ji),e(F,We),k(Wt,We,null),e(We,Ei),e(We,Bn),e(Bn,Ii),e(F,Wi),e(F,Ve),k(Vt,Ve,null),e(Ve,Vi),e(Ve,Zn),e(Zn,Bi),e(F,Zi),e(F,Be),k(Bt,Be,null),e(Be,Gi),e(Be,Zt),e(Zt,Ri),e(Zt,Gn),e(Gn,Pi),e(Zt,Ai),v(t,Os,u),v(t,ge,u),e(ge,Ze),e(Ze,Rn),k(Gt,Rn,null),e(ge,Ni),e(ge,Pn),e(Pn,Si),v(t,Ys,u),v(t,U,u),k(Rt,U,null),e(U,Xi),e(U,Pt),e(Pt,Qi),e(Pt,An),e(An,Li),e(Pt,Hi),e(U,Oi),e(U,Nn),e(Nn,Yi),e(U,Di),k(Ge,U,null),e(U,Ki),e(U,At),e(At,ed),e(At,Sn),e(Sn,td),e(At,od),e(U,nd),k(Re,U,null),e(U,sd),e(U,Nt),e(Nt,ad),e(Nt,Zo),e(Zo,rd),e(Nt,id),e(U,dd),e(U,Pe),k(St,Pe,null),e(Pe,ld),e(Pe,Xn),e(Xn,cd),v(t,Ds,u),v(t,_e,u),e(_e,Ae),e(Ae,Qn),k(Xt,Qn,null),e(_e,pd),e(_e,Ln),e(Ln,hd),v(t,Ks,u),v(t,S,u),k(Qt,S,null),e(S,md),e(S,Lt),e(Lt,ud),e(Lt,Go),e(Go,fd),e(Lt,gd),e(S,_d),e(S,Ht),e(Ht,vd),e(Ht,Ot),e(Ot,bd),e(Ht,yd),e(S,kd),e(S,O),k(Yt,O,null),e(O,Md),e(O,ve),e(ve,wd),e(ve,Ro),e(Ro,Td),e(ve,$d),e(ve,Hn),e(Hn,zd),e(ve,Fd),e(O,Cd),k(Ne,O,null),e(O,jd),k(Se,O,null),v(t,ea,u),v(t,be,u),e(be,Xe),e(Xe,On),k(Dt,On,null),e(be,Ud),e(be,Yn),e(Yn,xd),v(t,ta,u),v(t,X,u),k(Kt,X,null),e(X,qd),e(X,eo),e(eo,Jd),e(eo,Po),e(Po,Ed),e(eo,Id),e(X,Wd),e(X,to),e(to,Vd),e(to,oo),e(oo,Bd),e(to,Zd),e(X,Gd),e(X,x),k(no,x,null),e(x,Rd),e(x,ye),e(ye,Pd),e(ye,Ao),e(Ao,Ad),e(ye,Nd),e(ye,Dn),e(Dn,Sd),e(ye,Xd),e(x,Qd),k(Qe,x,null),e(x,Ld),e(x,Kn),e(Kn,Hd),e(x,Od),e(x,es),e(es,Yd),e(x,Dd),k(Le,x,null),e(x,Kd),e(x,ts),e(ts,el),e(x,tl),k(He,x,null),v(t,oa,u),v(t,ke,u),e(ke,Oe),e(Oe,os),k(so,os,null),e(ke,ol),e(ke,ns),e(ns,nl),v(t,na,u),v(t,G,u),k(ao,G,null),e(G,sl),e(G,ss),e(ss,al),e(G,rl),e(G,ro),e(ro,il),e(ro,No),e(No,dl),e(ro,ll),e(G,cl),e(G,io),e(io,pl),e(io,lo),e(lo,hl),e(io,ml),e(G,ul),e(G,q),k(co,q,null),e(q,fl),e(q,Me),e(Me,gl),e(Me,So),e(So,_l),e(Me,vl),e(Me,as),e(as,bl),e(Me,yl),e(q,kl),k(Ye,q,null),e(q,Ml),e(q,rs),e(rs,wl),e(q,Tl),e(q,po),e(po,$l),e(po,is),e(is,zl),e(po,Fl),e(q,Cl),k(De,q,null),e(q,jl),e(q,ds),e(ds,Ul),e(q,xl),k(Ke,q,null),v(t,sa,u),v(t,we,u),e(we,et),e(et,ls),k(ho,ls,null),e(we,ql),e(we,cs),e(cs,Jl),v(t,aa,u),v(t,R,u),k(mo,R,null),e(R,El),e(R,Te),e(Te,Il),e(Te,ps),e(ps,Wl),e(Te,Vl),e(Te,hs),e(hs,Bl),e(Te,Zl),e(R,Gl),e(R,uo),e(uo,Rl),e(uo,Xo),e(Xo,Pl),e(uo,Al),e(R,Nl),e(R,fo),e(fo,Sl),e(fo,go),e(go,Xl),e(fo,Ql),e(R,Ll),e(R,J),k(_o,J,null),e(J,Hl),e(J,$e),e($e,Ol),e($e,Qo),e(Qo,Yl),e($e,Dl),e($e,ms),e(ms,Kl),e($e,ec),e(J,tc),k(tt,J,null),e(J,oc),e(J,us),e(us,nc),e(J,sc),e(J,Lo),e(Lo,ac),e(Lo,fs),e(fs,rc),e(J,ic),k(ot,J,null),e(J,dc),e(J,gs),e(gs,lc),e(J,cc),k(nt,J,null),v(t,ra,u),v(t,ze,u),e(ze,st),e(st,_s),k(vo,_s,null),e(ze,pc),e(ze,vs),e(vs,hc),v(t,ia,u),v(t,Fe,u),k(bo,Fe,null),e(Fe,mc),e(Fe,at),k(yo,at,null),e(at,uc),k(rt,at,null),da=!0},p(t,[u]){const ko={};u&2&&(ko.$$scope={dirty:u,ctx:t}),qe.$set(ko);const bs={};u&2&&(bs.$$scope={dirty:u,ctx:t}),Ee.$set(bs);const ys={};u&2&&(ys.$$scope={dirty:u,ctx:t}),Ie.$set(ys);const ks={};u&2&&(ks.$$scope={dirty:u,ctx:t}),Ge.$set(ks);const Mo={};u&2&&(Mo.$$scope={dirty:u,ctx:t}),Re.$set(Mo);const Ms={};u&2&&(Ms.$$scope={dirty:u,ctx:t}),Ne.$set(Ms);const ws={};u&2&&(ws.$$scope={dirty:u,ctx:t}),Se.$set(ws);const Ts={};u&2&&(Ts.$$scope={dirty:u,ctx:t}),Qe.$set(Ts);const wo={};u&2&&(wo.$$scope={dirty:u,ctx:t}),Le.$set(wo);const $s={};u&2&&($s.$$scope={dirty:u,ctx:t}),He.$set($s);const zs={};u&2&&(zs.$$scope={dirty:u,ctx:t}),Ye.$set(zs);const ee={};u&2&&(ee.$$scope={dirty:u,ctx:t}),De.$set(ee);const Fs={};u&2&&(Fs.$$scope={dirty:u,ctx:t}),Ke.$set(Fs);const Cs={};u&2&&(Cs.$$scope={dirty:u,ctx:t}),tt.$set(Cs);const js={};u&2&&(js.$$scope={dirty:u,ctx:t}),ot.$set(js);const Us={};u&2&&(Us.$$scope={dirty:u,ctx:t}),nt.$set(Us);const xs={};u&2&&(xs.$$scope={dirty:u,ctx:t}),rt.$set(xs)},i(t){da||(M(h.$$.fragment,t),M(ht.$$.fragment,t),M(kt.$$.fragment,t),M(Mt.$$.fragment,t),M(wt.$$.fragment,t),M($t.$$.fragment,t),M(zt.$$.fragment,t),M(Ft.$$.fragment,t),M(Ct.$$.fragment,t),M(qe.$$.fragment,t),M(Ut.$$.fragment,t),M(xt.$$.fragment,t),M(Ee.$$.fragment,t),M(Ie.$$.fragment,t),M(Et.$$.fragment,t),M(Wt.$$.fragment,t),M(Vt.$$.fragment,t),M(Bt.$$.fragment,t),M(Gt.$$.fragment,t),M(Rt.$$.fragment,t),M(Ge.$$.fragment,t),M(Re.$$.fragment,t),M(St.$$.fragment,t),M(Xt.$$.fragment,t),M(Qt.$$.fragment,t),M(Yt.$$.fragment,t),M(Ne.$$.fragment,t),M(Se.$$.fragment,t),M(Dt.$$.fragment,t),M(Kt.$$.fragment,t),M(no.$$.fragment,t),M(Qe.$$.fragment,t),M(Le.$$.fragment,t),M(He.$$.fragment,t),M(so.$$.fragment,t),M(ao.$$.fragment,t),M(co.$$.fragment,t),M(Ye.$$.fragment,t),M(De.$$.fragment,t),M(Ke.$$.fragment,t),M(ho.$$.fragment,t),M(mo.$$.fragment,t),M(_o.$$.fragment,t),M(tt.$$.fragment,t),M(ot.$$.fragment,t),M(nt.$$.fragment,t),M(vo.$$.fragment,t),M(bo.$$.fragment,t),M(yo.$$.fragment,t),M(rt.$$.fragment,t),da=!0)},o(t){w(h.$$.fragment,t),w(ht.$$.fragment,t),w(kt.$$.fragment,t),w(Mt.$$.fragment,t),w(wt.$$.fragment,t),w($t.$$.fragment,t),w(zt.$$.fragment,t),w(Ft.$$.fragment,t),w(Ct.$$.fragment,t),w(qe.$$.fragment,t),w(Ut.$$.fragment,t),w(xt.$$.fragment,t),w(Ee.$$.fragment,t),w(Ie.$$.fragment,t),w(Et.$$.fragment,t),w(Wt.$$.fragment,t),w(Vt.$$.fragment,t),w(Bt.$$.fragment,t),w(Gt.$$.fragment,t),w(Rt.$$.fragment,t),w(Ge.$$.fragment,t),w(Re.$$.fragment,t),w(St.$$.fragment,t),w(Xt.$$.fragment,t),w(Qt.$$.fragment,t),w(Yt.$$.fragment,t),w(Ne.$$.fragment,t),w(Se.$$.fragment,t),w(Dt.$$.fragment,t),w(Kt.$$.fragment,t),w(no.$$.fragment,t),w(Qe.$$.fragment,t),w(Le.$$.fragment,t),w(He.$$.fragment,t),w(so.$$.fragment,t),w(ao.$$.fragment,t),w(co.$$.fragment,t),w(Ye.$$.fragment,t),w(De.$$.fragment,t),w(Ke.$$.fragment,t),w(ho.$$.fragment,t),w(mo.$$.fragment,t),w(_o.$$.fragment,t),w(tt.$$.fragment,t),w(ot.$$.fragment,t),w(nt.$$.fragment,t),w(vo.$$.fragment,t),w(bo.$$.fragment,t),w(yo.$$.fragment,t),w(rt.$$.fragment,t),da=!1},d(t){o(d),t&&o(g),t&&o(l),T(h),t&&o(A),t&&o(Q),T(ht),t&&o(qs),t&&o(Ce),t&&o(Js),t&&o(To),t&&o(Es),t&&o(L),t&&o(Is),t&&o($o),t&&o(Ws),t&&o(H),t&&o(Vs),t&&o(ne),t&&o(Bs),t&&o(ce),T(kt),t&&o(Zs),T(Mt,t),t&&o(Gs),t&&o(zo),t&&o(Rs),T(wt,t),t&&o(Ps),t&&o(se),t&&o(As),T($t,t),t&&o(Ns),t&&o(pe),T(zt),t&&o(Ss),t&&o(I),t&&o(Xs),t&&o(he),T(Ft),t&&o(Qs),t&&o(N),T(Ct),T(qe),t&&o(Ls),t&&o(fe),T(Ut),t&&o(Hs),t&&o(F),T(xt),T(Ee),T(Ie),T(Et),T(Wt),T(Vt),T(Bt),t&&o(Os),t&&o(ge),T(Gt),t&&o(Ys),t&&o(U),T(Rt),T(Ge),T(Re),T(St),t&&o(Ds),t&&o(_e),T(Xt),t&&o(Ks),t&&o(S),T(Qt),T(Yt),T(Ne),T(Se),t&&o(ea),t&&o(be),T(Dt),t&&o(ta),t&&o(X),T(Kt),T(no),T(Qe),T(Le),T(He),t&&o(oa),t&&o(ke),T(so),t&&o(na),t&&o(G),T(ao),T(co),T(Ye),T(De),T(Ke),t&&o(sa),t&&o(we),T(ho),t&&o(aa),t&&o(R),T(mo),T(_o),T(tt),T(ot),T(nt),t&&o(ra),t&&o(ze),T(vo),t&&o(ia),t&&o(Fe),T(bo),T(yo),T(rt)}}}const qh={local:"mvp",sections:[{local:"overview",title:"Overview"},{local:"examples",title:"Examples"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.MvpConfig",title:"MvpConfig"},{local:"transformers.MvpTokenizer",title:"MvpTokenizer"},{local:"transformers.MvpTokenizerFast",title:"MvpTokenizerFast"},{local:"transformers.MvpModel",title:"MvpModel"},{local:"transformers.MvpForConditionalGeneration",title:"MvpForConditionalGeneration"},{local:"transformers.MvpForSequenceClassification",title:"MvpForSequenceClassification"},{local:"transformers.MvpForQuestionAnswering",title:"MvpForQuestionAnswering"},{local:"transformers.MvpForCausalLM",title:"MvpForCausalLM"}],title:"MVP"};function Jh(z){return mh(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Gh extends lh{constructor(d){super();ch(this,d,Jh,xh,ph,{})}}export{Gh as default,qh as metadata};
