import{S as lh,i as ch,s as ph,e as n,k as c,w as k,t as r,M as hh,c as s,d as o,m as p,a,x as b,h as i,b as m,G as e,g as v,y as w,q as y,o as T,B as $,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 A}from"../../chunks/Docstring-hf-doc-builder.js";import{C as V}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Z}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,M;return f=new V({props:{code:`from transformers import MvpConfig, MvpModel

# Initializing a MVP RUCAIBox/mvp style configuration
configuration = MvpConfig()

# Initializing a model (with random weights) from the RUCAIBox/mvp style configuration
model = MvpModel(configuration)

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

tokenizer = MvpTokenizer.from_pretrained("RUCAIBox/mvp")
tokenizer("Hello world")["input_ids"]

tokenizer(" Hello world")["input_ids"]`,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(),k(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),b(f.$$.fragment,h)},m(h,_){v(h,d,_),e(d,g),v(h,l,_),w(f,h,_),M=!0},p:oe,i(h){M||(y(f.$$.fragment,h),M=!0)},o(h){T(f.$$.fragment,h),M=!1},d(h){h&&o(d),h&&o(l),$(f,h)}}}function gh(z){let d,g,l,f,M;return{c(){d=n("p"),g=r("When used with "),l=n("code"),f=r("is_split_into_words=True"),M=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 q=a(l);f=i(q,"is_split_into_words=True"),q.forEach(o),M=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,M)},d(h){h&&o(d)}}}function _h(z){let d,g,l,f,M;return f=new V({props:{code:`from transformers import MvpTokenizerFast

tokenizer = MvpTokenizerFast.from_pretrained("RUCAIBox/mvp")
tokenizer("Hello world")["input_ids"]

tokenizer(" Hello world")["input_ids"]`,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(),k(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),b(f.$$.fragment,h)},m(h,_){v(h,d,_),e(d,g),v(h,l,_),w(f,h,_),M=!0},p:oe,i(h){M||(y(f.$$.fragment,h),M=!0)},o(h){T(f.$$.fragment,h),M=!1},d(h){h&&o(d),h&&o(l),$(f,h)}}}function vh(z){let d,g,l,f,M,h,_,q;return{c(){d=n("p"),g=r("When used with "),l=n("code"),f=r("is_split_into_words=True"),M=r(", this tokenizer needs to be instantiated with "),h=n("code"),_=r("add_prefix_space=True"),q=r(".")},l(de){d=s(de,"P",{});var B=a(d);g=i(B,"When used with "),l=s(B,"CODE",{});var Q=a(l);f=i(Q,"is_split_into_words=True"),Q.forEach(o),M=i(B,", this tokenizer needs to be instantiated with "),h=s(B,"CODE",{});var K=a(h);_=i(K,"add_prefix_space=True"),K.forEach(o),q=i(B,"."),B.forEach(o)},m(de,B){v(de,d,B),e(d,g),e(d,l),e(l,f),e(d,M),e(d,h),e(h,_),e(d,q)},d(de){de&&o(d)}}}function kh(z){let d,g,l,f,M;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"),M=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 q=a(l);f=i(q,"Module"),q.forEach(o),M=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,M)},d(h){h&&o(d)}}}function bh(z){let d,g,l,f,M;return f=new V({props:{code:`from transformers import AutoTokenizer, MvpModel
import torch

tokenizer = AutoTokenizer.from_pretrained("RUCAIBox/mvp")
model = MvpModel.from_pretrained("RUCAIBox/mvp")

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

last_hidden_states = outputs.last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> 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(),k(f.$$.fragment)},l(h){d=s(h,"P",{});var _=a(d);g=i(_,"Example:"),_.forEach(o),l=p(h),b(f.$$.fragment,h)},m(h,_){v(h,d,_),e(d,g),v(h,l,_),w(f,h,_),M=!0},p:oe,i(h){M||(y(f.$$.fragment,h),M=!0)},o(h){T(f.$$.fragment,h),M=!1},d(h){h&&o(d),h&&o(l),$(f,h)}}}function wh(z){let d,g,l,f,M;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"),M=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 q=a(l);f=i(q,"Module"),q.forEach(o),M=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,M)},d(h){h&&o(d)}}}function yh(z){let d,g;return d=new V({props:{code:`import torch
from transformers import AutoTokenizer, MvpForConditionalGeneration

tokenizer = AutoTokenizer.from_pretrained("RUCAIBox/mvp")
model = MvpForConditionalGeneration.from_pretrained("RUCAIBox/mvp")

inputs = tokenizer(
    "Summarize: You may want to stick it to your boss and leave your job, but don't do it if these are your reasons.",
    return_tensors="pt",
)
labels = tokenizer("Bad Reasons To Quit Your Job", return_tensors="pt")["input_ids"]

loss = model(**inputs, labels=labels).loss
loss.backward()`,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(){k(d.$$.fragment)},l(l){b(d.$$.fragment,l)},m(l,f){w(d,l,f),g=!0},p:oe,i(l){g||(y(d.$$.fragment,l),g=!0)},o(l){T(d.$$.fragment,l),g=!1},d(l){$(d,l)}}}function Th(z){let d,g;return d=new V({props:{code:`with torch.no_grad():
    generated_ids = model.generate(**inputs)

generated_text = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)`,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(){k(d.$$.fragment)},l(l){b(d.$$.fragment,l)},m(l,f){w(d,l,f),g=!0},p:oe,i(l){g||(y(d.$$.fragment,l),g=!0)},o(l){T(d.$$.fragment,l),g=!1},d(l){$(d,l)}}}function $h(z){let d,g,l,f,M;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"),M=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 q=a(l);f=i(q,"Module"),q.forEach(o),M=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,M)},d(h){h&&o(d)}}}function Mh(z){let d,g;return d=new V({props:{code:`import torch
from transformers import AutoTokenizer, MvpForSequenceClassification

num_labels = 2  # for example, this is a binary classification task
tokenizer = AutoTokenizer.from_pretrained("RUCAIBox/mvp")
model = MvpForSequenceClassification.from_pretrained("RUCAIBox/mvp", num_labels=num_labels)

inputs = tokenizer("Classify: Hello, my dog is cute", return_tensors="pt")
labels = torch.tensor(1)  # the real label for inputs

loss = model(**inputs, labels=labels).loss
loss.backward()`,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(){k(d.$$.fragment)},l(l){b(d.$$.fragment,l)},m(l,f){w(d,l,f),g=!0},p:oe,i(l){g||(y(d.$$.fragment,l),g=!0)},o(l){T(d.$$.fragment,l),g=!1},d(l){$(d,l)}}}function zh(z){let d,g;return d=new V({props:{code:`with torch.no_grad():
    logits = model(**inputs).logits

predicted_class_id = logits.argmax()`,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(){k(d.$$.fragment)},l(l){b(d.$$.fragment,l)},m(l,f){w(d,l,f),g=!0},p:oe,i(l){g||(y(d.$$.fragment,l),g=!0)},o(l){T(d.$$.fragment,l),g=!1},d(l){$(d,l)}}}function xh(z){let d,g,l,f,M;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"),M=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 q=a(l);f=i(q,"Module"),q.forEach(o),M=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,M)},d(h){h&&o(d)}}}function qh(z){let d,g;return d=new V({props:{code:`import torch
from transformers import AutoTokenizer, MvpForQuestionAnswering

tokenizer = AutoTokenizer.from_pretrained("RUCAIBox/mvp")
model = MvpForQuestionAnswering.from_pretrained("RUCAIBox/mvp")

inputs = tokenizer(
    "Answer the following question: Who was Jim Henson? [SEP] Jim Henson was a nice puppet",
    return_tensors="pt",
)
target_start_index = torch.tensor([18])
target_end_index = torch.tensor([19])

loss = model(**inputs, start_positions=target_start_index, end_positions=target_end_index).loss
loss.backward()`,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(){k(d.$$.fragment)},l(l){b(d.$$.fragment,l)},m(l,f){w(d,l,f),g=!0},p:oe,i(l){g||(y(d.$$.fragment,l),g=!0)},o(l){T(d.$$.fragment,l),g=!1},d(l){$(d,l)}}}function Fh(z){let d,g;return d=new V({props:{code:`with torch.no_grad():
    outputs = model(**inputs)

answer_start_index = outputs.start_logits.argmax()
answer_end_index = outputs.end_logits.argmax()

predict_answer_tokens = inputs.input_ids[0, answer_start_index : answer_end_index + 1]
predict_answer = tokenizer.decode(predict_answer_tokens)`,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(){k(d.$$.fragment)},l(l){b(d.$$.fragment,l)},m(l,f){w(d,l,f),g=!0},p:oe,i(l){g||(y(d.$$.fragment,l),g=!0)},o(l){T(d.$$.fragment,l),g=!1},d(l){$(d,l)}}}function Ch(z){let d,g,l,f,M;return f=new V({props:{code:`from transformers import AutoTokenizer, MvpForCausalLM

tokenizer = AutoTokenizer.from_pretrained("RUCAIBox/mvp")
model = MvpForCausalLM.from_pretrained("RUCAIBox/mvp", add_cross_attention=False)

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

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

tokenizer = MvpTokenizer.from_pretrained("RUCAIBox/mvp")
model = MvpForConditionalGeneration.from_pretrained("RUCAIBox/mvp")
model_with_prompt = MvpForConditionalGeneration.from_pretrained("RUCAIBox/mvp-summarization")

inputs = tokenizer(
    "Summarize: You may want to stick it to your boss and leave your job, but don't do it if these are your reasons.",
    return_tensors="pt",
)
generated_ids = model.generate(**inputs)
tokenizer.batch_decode(generated_ids, skip_special_tokens=True)

generated_ids = model_with_prompt.generate(**inputs)
tokenizer.batch_decode(generated_ids, skip_special_tokens=True)`,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>]`}}),Tt=new V({props:{code:`from transformers import MvpTokenizerFast, MvpForConditionalGeneration

tokenizer = MvpTokenizerFast.from_pretrained("RUCAIBox/mvp")
model = MvpForConditionalGeneration.from_pretrained("RUCAIBox/mvp")
model_with_mtl = MvpForConditionalGeneration.from_pretrained("RUCAIBox/mtl-data-to-text")

inputs = tokenizer(
    "Describe the following data: Iron Man | instance of | Superhero [SEP] Stan Lee | creator | Iron Man",
    return_tensors="pt",
)
generated_ids = model.generate(**inputs)
tokenizer.batch_decode(generated_ids, skip_special_tokens=True)

generated_ids = model_with_mtl.generate(**inputs)
tokenizer.batch_decode(generated_ids, skip_special_tokens=True)`,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>]`}}),Mt=new V({props:{code:`from transformers import MvpForConditionalGeneration

model = MvpForConditionalGeneration.from_pretrained("RUCAIBox/mvp", use_prompt=True)
# the number of trainable parameters (full tuning)
sum(p.numel() for p in model.parameters() if p.requires_grad)

# lightweight tuning with randomly initialized prompts
model.set_lightweight_tuning()
# the number of trainable parameters (lightweight tuning)
sum(p.numel() for p in model.parameters() if p.requires_grad)

# lightweight tuning with task-specific prompts
model = MvpForConditionalGeneration.from_pretrained("RUCAIBox/mtl-data-to-text")
model.set_lightweight_tuning()
# original lightweight Prefix-tuning
model = MvpForConditionalGeneration.from_pretrained("facebook/bart-large", use_prompt=True)
model.set_lightweight_tuning()`,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 Z({}),xt=new Z({}),qt=new A({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/v4.29.0/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/v4.29.0/src/transformers/models/mvp/configuration_mvp.py#L29"}}),je=new te({props:{anchor:"transformers.MvpConfig.example",$$slots:{default:[uh]},$$scope:{ctx:z}}}),Ct=new Z({}),Pt=new A({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/v4.29.0/src/transformers/models/mvp/tokenization_mvp.py#L89"}}),Ae=new te({props:{anchor:"transformers.MvpTokenizer.example",$$slots:{default:[fh]},$$scope:{ctx:z}}}),Ie=new rn({props:{$$slots:{default:[gh]},$$scope:{ctx:z}}}),At=new A({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/v4.29.0/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>
`}}),Lt=new A({props:{name:"convert_tokens_to_string",anchor:"transformers.MvpTokenizer.convert_tokens_to_string",parameters:[{name:"tokens",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mvp/tokenization_mvp.py#L292"}}),Ot=new A({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/v4.29.0/src/transformers/models/mvp/tokenization_mvp.py#L379",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),St=new A({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/v4.29.0/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>
`}}),Dt=new Z({}),Ut=new A({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/v4.29.0/src/transformers/models/mvp/tokenization_mvp_fast.py#L53"}}),De=new te({props:{anchor:"transformers.MvpTokenizerFast.example",$$slots:{default:[_h]},$$scope:{ctx:z}}}),Ue=new rn({props:{$$slots:{default:[vh]},$$scope:{ctx:z}}}),Rt=new A({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/v4.29.0/src/transformers/models/mvp/tokenization_mvp_fast.py#L268",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Wt=new Z({}),Qt=new A({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/v4.29.0/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/v4.29.0/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/v4.29.0/src/transformers/models/mvp/modeling_mvp.py#L1297"}}),Xt=new A({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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mvp/modeling_mvp.py#L1336",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/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/v4.29.0/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/v4.29.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ge=new rn({props:{$$slots:{default:[kh]},$$scope:{ctx:z}}}),Re=new te({props:{anchor:"transformers.MvpModel.forward.example",$$slots:{default:[bh]},$$scope:{ctx:z}}}),Zt=new Z({}),Kt=new A({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/v4.29.0/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/v4.29.0/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/v4.29.0/src/transformers/models/mvp/modeling_mvp.py#L1434"}}),no=new A({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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/v4.29.0/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/v4.29.0/src/transformers/models/mvp/modeling_mvp.py#L1476",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/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/v4.29.0/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/v4.29.0/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:[wh]},$$scope:{ctx:z}}}),He=new te({props:{anchor:"transformers.MvpForConditionalGeneration.forward.example",$$slots:{default:[yh]},$$scope:{ctx:z}}}),Je=new te({props:{anchor:"transformers.MvpForConditionalGeneration.forward.example-2",$$slots:{default:[Th]},$$scope:{ctx:z}}}),so=new Z({}),ao=new A({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/v4.29.0/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/v4.29.0/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/v4.29.0/src/transformers/models/mvp/modeling_mvp.py#L1606"}}),co=new A({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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/v4.29.0/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/v4.29.0/src/transformers/models/mvp/modeling_mvp.py#L1627"}}),Xe=new rn({props:{$$slots:{default:[$h]},$$scope:{ctx:z}}}),Ze=new te({props:{anchor:"transformers.MvpForSequenceClassification.forward.example",$$slots:{default:[Mh]},$$scope:{ctx:z}}}),Ke=new te({props:{anchor:"transformers.MvpForSequenceClassification.forward.example-2",$$slots:{default:[zh]},$$scope:{ctx:z}}}),ho=new Z({}),mo=new A({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/v4.29.0/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/v4.29.0/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/v4.29.0/src/transformers/models/mvp/modeling_mvp.py#L1734"}}),_o=new A({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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/v4.29.0/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/v4.29.0/src/transformers/models/mvp/modeling_mvp.py#L1754"}}),tt=new rn({props:{$$slots:{default:[xh]},$$scope:{ctx:z}}}),ot=new te({props:{anchor:"transformers.MvpForQuestionAnswering.forward.example",$$slots:{default:[qh]},$$scope:{ctx:z}}}),nt=new te({props:{anchor:"transformers.MvpForQuestionAnswering.forward.example-2",$$slots:{default:[Fh]},$$scope:{ctx:z}}}),vo=new Z({}),ko=new A({props:{name:"class transformers.MvpForCausalLM",anchor:"transformers.MvpForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mvp/modeling_mvp.py#L1866"}}),bo=new A({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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mvp/modeling_mvp.py#L1903",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/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/v4.29.0/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/v4.29.0/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:[Ch]},$$scope:{ctx:z}}}),{c(){d=n("meta"),g=c(),l=n("h1"),f=n("a"),M=n("span"),k(h.$$.fragment),_=c(),q=n("span"),de=r("MVP"),B=c(),Q=n("h2"),K=n("a"),dn=n("span"),k(ht.$$.fragment),Ga=c(),ln=n("span"),Ra=r("Overview"),js=c(),qe=n("p"),Wa=r("The MVP model was proposed in "),mt=n("a"),Qa=r("MVP: Multi-task Supervised Pre-training for Natural Language Generation"),Ha=r(" by Tianyi Tang, Junyi Li, Wayne Xin Zhao and Ji-Rong Wen."),Es=c(),$o=n("p"),Ja=r("According to the abstract,"),As=c(),H=n("ul"),cn=n("li"),Ya=r("MVP follows a standard Transformer encoder-decoder architecture."),Xa=c(),pn=n("li"),Za=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(),Mo=n("p"),nr=r("Tips:"),Ls=c(),J=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"),kr=r("set_lightweight_tuning()"),br=r("."),Os=c(),ne=n("p"),wr=r("This model was contributed by "),kt=n("a"),yr=r("Tianyi Tang"),Tr=r(". The detailed information and instructions can be found "),bt=n("a"),$r=r("here"),Mr=r("."),Ss=c(),ce=n("h2"),Fe=n("a"),_n=n("span"),k(wt.$$.fragment),zr=c(),vn=n("span"),xr=r("Examples"),Ns=r(`

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

	`),k(yt.$$.fragment),Ds=c(),zo=n("p"),qr=r("For data-to-text generation, it is an example to use MVP and multi-task pre-trained variants."),Us=c(),k(Tt.$$.fragment),Vs=c(),se=n("p"),Fr=r("For lightweight tuning, "),kn=n("em"),Cr=r("i.e."),Pr=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 "),$t=n("a"),jr=r("original paper"),Er=r("."),Bs=c(),k(Mt.$$.fragment),Gs=c(),pe=n("h2"),Ce=n("a"),bn=n("span"),k(zt.$$.fragment),Ar=c(),wn=n("span"),Ir=r("Documentation resources"),Rs=c(),I=n("ul"),yn=n("li"),xo=n("a"),Lr=r("Text classification task guide"),Or=c(),Tn=n("li"),qo=n("a"),Sr=r("Question answering task guide"),Nr=c(),$n=n("li"),Fo=n("a"),Dr=r("Causal language modeling task guide"),Ur=c(),Mn=n("li"),Co=n("a"),Vr=r("Masked language modeling task guide"),Br=c(),zn=n("li"),Po=n("a"),Gr=r("Translation task guide"),Rr=c(),xn=n("li"),jo=n("a"),Wr=r("Summarization task guide"),Ws=c(),he=n("h2"),Pe=n("a"),qn=n("span"),k(xt.$$.fragment),Qr=c(),Fn=n("span"),Hr=r("MvpConfig"),Qs=c(),G=n("div"),k(qt.$$.fragment),Jr=c(),me=n("p"),Yr=r("This is the configuration class to store the configuration of a "),Eo=n("a"),Xr=r("MvpModel"),Zr=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 `),Ft=n("a"),Kr=r("RUCAIBox/mvp"),ei=r(`
architecture.`),ti=c(),ue=n("p"),oi=r("Configuration objects inherit from "),Ao=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(),k(je.$$.fragment),Hs=c(),fe=n("h2"),Ee=n("a"),Cn=n("span"),k(Ct.$$.fragment),di=c(),Pn=n("span"),li=r("MvpTokenizer"),Js=c(),x=n("div"),k(Pt.$$.fragment),ci=c(),jn=n("p"),pi=r("Constructs a MVP tokenizer, which is smilar to the RoBERTa tokenizer, using byte-level Byte-Pair-Encoding."),hi=c(),En=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(),k(Ae.$$.fragment),fi=c(),jt=n("p"),gi=r("You can get around that behavior by passing "),An=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.`),ki=c(),k(Ie.$$.fragment),bi=c(),Et=n("p"),wi=r("This tokenizer inherits from "),Lo=n("a"),yi=r("PreTrainedTokenizer"),Ti=r(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),$i=c(),ae=n("div"),k(At.$$.fragment),Mi=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:`),xi=c(),It=n("ul"),Oo=n("li"),qi=r("single sequence: "),Ln=n("code"),Fi=r("<s> X </s>"),Ci=c(),So=n("li"),Pi=r("pair of sequences: "),On=n("code"),ji=r("<s> A </s></s> B </s>"),Ei=c(),Le=n("div"),k(Lt.$$.fragment),Ai=c(),Sn=n("p"),Ii=r("Converts a sequence of tokens (string) in a single string."),Li=c(),Oe=n("div"),k(Ot.$$.fragment),Oi=c(),Nn=n("p"),Si=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.`),Ni=c(),Se=n("div"),k(St.$$.fragment),Di=c(),Nt=n("p"),Ui=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 `),Dn=n("code"),Vi=r("prepare_for_model"),Bi=r(" method."),Ys=c(),ge=n("h2"),Ne=n("a"),Un=n("span"),k(Dt.$$.fragment),Gi=c(),Vn=n("span"),Ri=r("MvpTokenizerFast"),Xs=c(),C=n("div"),k(Ut.$$.fragment),Wi=c(),Vt=n("p"),Qi=r("Construct a \u201Cfast\u201D MVP tokenizer (backed by HuggingFace\u2019s "),Bn=n("em"),Hi=r("tokenizers"),Ji=r(` library), derived from the GPT-2 tokenizer,
using byte-level Byte-Pair-Encoding.`),Yi=c(),Gn=n("p"),Xi=r("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Zi=c(),k(De.$$.fragment),Ki=c(),Bt=n("p"),ed=r("You can get around that behavior by passing "),Rn=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(),k(Ue.$$.fragment),sd=c(),Gt=n("p"),ad=r("This tokenizer inherits from "),No=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(),Ve=n("div"),k(Rt.$$.fragment),ld=c(),Wn=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.`),Zs=c(),_e=n("h2"),Be=n("a"),Qn=n("span"),k(Wt.$$.fragment),pd=c(),Hn=n("span"),hd=r("MvpModel"),Ks=c(),R=n("div"),k(Qt.$$.fragment),md=c(),Ht=n("p"),ud=r(`The bare MVP Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Do=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(),Jt=n("p"),vd=r("This model is also a PyTorch "),Yt=n("a"),kd=r("torch.nn.Module"),bd=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),wd=c(),Y=n("div"),k(Xt.$$.fragment),yd=c(),ve=n("p"),Td=r("The "),Uo=n("a"),$d=r("MvpModel"),Md=r(" forward method, overrides the "),Jn=n("code"),zd=r("__call__"),xd=r(" special method."),qd=c(),k(Ge.$$.fragment),Fd=c(),k(Re.$$.fragment),ea=c(),ke=n("h2"),We=n("a"),Yn=n("span"),k(Zt.$$.fragment),Cd=c(),Xn=n("span"),Pd=r("MvpForConditionalGeneration"),ta=c(),W=n("div"),k(Kt.$$.fragment),jd=c(),eo=n("p"),Ed=r(`The MVP Model with a language modeling head. Can be used for various text generation tasks.
This model inherits from `),Vo=n("a"),Ad=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.)`),Ld=c(),to=n("p"),Od=r("This model is also a PyTorch "),oo=n("a"),Sd=r("torch.nn.Module"),Nd=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Dd=c(),P=n("div"),k(no.$$.fragment),Ud=c(),be=n("p"),Vd=r("The "),Bo=n("a"),Bd=r("MvpForConditionalGeneration"),Gd=r(" forward method, overrides the "),Zn=n("code"),Rd=r("__call__"),Wd=r(" special method."),Qd=c(),k(Qe.$$.fragment),Hd=c(),Kn=n("p"),Jd=r("Example of summarization:"),Yd=c(),es=n("p"),Xd=r("Fine-tuning a model"),Zd=c(),k(He.$$.fragment),Kd=c(),ts=n("p"),el=r("Inference after the model fine-tuned"),tl=c(),k(Je.$$.fragment),oa=c(),we=n("h2"),Ye=n("a"),os=n("span"),k(so.$$.fragment),ol=c(),ns=n("span"),nl=r("MvpForSequenceClassification"),na=c(),D=n("div"),k(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 "),Go=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(),j=n("div"),k(co.$$.fragment),fl=c(),ye=n("p"),gl=r("The "),Ro=n("a"),_l=r("MvpForSequenceClassification"),vl=r(" forward method, overrides the "),as=n("code"),kl=r("__call__"),bl=r(" special method."),wl=c(),k(Xe.$$.fragment),yl=c(),rs=n("p"),Tl=r("Example of single-label classification:"),$l=c(),po=n("p"),Ml=r("Fine-tuning a model on "),is=n("code"),zl=r("num_labels"),xl=r(" classes"),ql=c(),k(Ze.$$.fragment),Fl=c(),ds=n("p"),Cl=r("Inference after the model fine-tuned"),Pl=c(),k(Ke.$$.fragment),sa=c(),Te=n("h2"),et=n("a"),ls=n("span"),k(ho.$$.fragment),jl=c(),cs=n("span"),El=r("MvpForQuestionAnswering"),aa=c(),U=n("div"),k(mo.$$.fragment),Al=c(),$e=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"),Ll=r("span start logits"),Ol=r(" and "),hs=n("code"),Sl=r("span end logits"),Nl=r(")."),Dl=c(),uo=n("p"),Ul=r("This model inherits from "),Wo=n("a"),Vl=r("PreTrainedModel"),Bl=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.)`),Gl=c(),fo=n("p"),Rl=r("This model is also a PyTorch "),go=n("a"),Wl=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.`),Hl=c(),E=n("div"),k(_o.$$.fragment),Jl=c(),Me=n("p"),Yl=r("The "),Qo=n("a"),Xl=r("MvpForQuestionAnswering"),Zl=r(" forward method, overrides the "),ms=n("code"),Kl=r("__call__"),ec=r(" special method."),tc=c(),k(tt.$$.fragment),oc=c(),us=n("p"),nc=r("Example:"),sc=c(),Ho=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(),k(ot.$$.fragment),dc=c(),gs=n("p"),lc=r("Inference after the model fine-tuned"),cc=c(),k(nt.$$.fragment),ra=c(),ze=n("h2"),st=n("a"),_s=n("span"),k(vo.$$.fragment),pc=c(),vs=n("span"),hc=r("MvpForCausalLM"),ia=c(),xe=n("div"),k(ko.$$.fragment),mc=c(),at=n("div"),k(bo.$$.fragment),uc=c(),k(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 wo=a(l);f=s(wo,"A",{id:!0,class:!0,href:!0});var ks=a(f);M=s(ks,"SPAN",{});var bs=a(M);b(h.$$.fragment,bs),bs.forEach(o),ks.forEach(o),_=p(wo),q=s(wo,"SPAN",{});var ws=a(q);de=i(ws,"MVP"),ws.forEach(o),wo.forEach(o),B=p(t),Q=s(t,"H2",{class:!0});var yo=a(Q);K=s(yo,"A",{id:!0,class:!0,href:!0});var ys=a(K);dn=s(ys,"SPAN",{});var Ts=a(dn);b(ht.$$.fragment,Ts),Ts.forEach(o),ys.forEach(o),Ga=p(yo),ln=s(yo,"SPAN",{});var $s=a(ln);Ra=i($s,"Overview"),$s.forEach(o),yo.forEach(o),js=p(t),qe=s(t,"P",{});var To=a(qe);Wa=i(To,"The MVP model was proposed in "),mt=s(To,"A",{href:!0,rel:!0});var Ms=a(mt);Qa=i(Ms,"MVP: Multi-task Supervised Pre-training for Natural Language Generation"),Ms.forEach(o),Ha=i(To," by Tianyi Tang, Junyi Li, Wayne Xin Zhao and Ji-Rong Wen."),To.forEach(o),Es=p(t),$o=s(t,"P",{});var zs=a($o);Ja=i(zs,"According to the abstract,"),zs.forEach(o),As=p(t),H=s(t,"UL",{});var ee=a(H);cn=s(ee,"LI",{});var xs=a(cn);Ya=i(xs,"MVP follows a standard Transformer encoder-decoder architecture."),xs.forEach(o),Xa=p(ee),pn=s(ee,"LI",{});var qs=a(pn);Za=i(qs,"MVP is supervised pre-trained using labeled datasets."),qs.forEach(o),Ka=p(ee),hn=s(ee,"LI",{});var Fs=a(hn);er=i(Fs,"MVP also has task-specific soft prompts to stimulate the model\u2019s capacity in performing a certain task."),Fs.forEach(o),tr=p(ee),mn=s(ee,"LI",{});var Cs=a(mn);or=i(Cs,"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."),Cs.forEach(o),ee.forEach(o),Is=p(t),Mo=s(t,"P",{});var Ps=a(Mo);nr=i(Ps,"Tips:"),Ps.forEach(o),Ls=p(t),J=s(t,"UL",{});var it=a(J);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 kc=a(un);lr=i(kc,"MvpForConditionalGeneration.from_pretrained('RUCAIBox/mvp')"),kc.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 bc=a(fn);mr=i(bc,"MvpForConditionalGeneration.from_pretrained('RUCAIBox/mvp-summarization')"),bc.forEach(o),ur=i(pa,"."),pa.forEach(o),fr=p(it),le=s(it,"LI",{});var Jo=a(le);gr=i(Jo,"Our model supports lightweight prompt tuning following "),vt=s(Jo,"A",{href:!0,rel:!0});var wc=a(vt);_r=i(wc,"Prefix-tuning"),wc.forEach(o),vr=i(Jo," with method "),gn=s(Jo,"CODE",{});var yc=a(gn);kr=i(yc,"set_lightweight_tuning()"),yc.forEach(o),br=i(Jo,"."),Jo.forEach(o),it.forEach(o),Os=p(t),ne=s(t,"P",{});var Yo=a(ne);wr=i(Yo,"This model was contributed by "),kt=s(Yo,"A",{href:!0,rel:!0});var Tc=a(kt);yr=i(Tc,"Tianyi Tang"),Tc.forEach(o),Tr=i(Yo,". The detailed information and instructions can be found "),bt=s(Yo,"A",{href:!0,rel:!0});var $c=a(bt);$r=i($c,"here"),$c.forEach(o),Mr=i(Yo,"."),Yo.forEach(o),Ss=p(t),ce=s(t,"H2",{class:!0});var ha=a(ce);Fe=s(ha,"A",{id:!0,class:!0,href:!0});var Mc=a(Fe);_n=s(Mc,"SPAN",{});var zc=a(_n);b(wt.$$.fragment,zc),zc.forEach(o),Mc.forEach(o),zr=p(ha),vn=s(ha,"SPAN",{});var xc=a(vn);xr=i(xc,"Examples"),xc.forEach(o),ha.forEach(o),Ns=i(t,`

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

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