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 u,G as e,g as v,y as w,q as y,o as T,B as $,v as uh,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 U}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 mh(z){let d,g,l,f,M;return f=new U({props:{code:`from transformers import MvpModel, MvpConfig

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

# Initializing a model 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> MvpModel, MvpConfig

<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 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 U({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="language-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MvpTokenizer</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer = MvpTokenizer.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mvp&quot;</span>)</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[0, 31414, 232, 2]
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[0, 20920, 232, 2]`}}),{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 U({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="language-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MvpTokenizerFast</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer = MvpTokenizerFast.from_pretrained(<span class="hljs-string">&quot;RUCAIBox/mvp&quot;</span>)</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[0, 31414, 232, 2]
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[0, 20920, 232, 2]`}}),{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 V=a(d);g=i(V,"When used with "),l=s(V,"CODE",{});var Q=a(l);f=i(Q,"is_split_into_words=True"),Q.forEach(o),M=i(V,", this tokenizer needs to be instantiated with "),h=s(V,"CODE",{});var K=a(h);_=i(K,"add_prefix_space=True"),K.forEach(o),q=i(V,"."),V.forEach(o)},m(de,V){v(de,d,V),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 U({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 U({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 U({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 U({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 U({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 U({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 Ch(z){let d,g;return d=new U({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 Fh(z){let d,g,l,f,M;return f=new U({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,V,Q,K,dn,ht,Ga,ln,Ra,Es,qe,Wa,ut,Qa,Ha,js,$o,Ja,As,H,cn,Ya,Xa,pn,Za,Ka,hn,er,tr,un,or,Is,Mo,nr,Ls,J,mt,sr,ft,ar,rr,ir,gt,dr,mn,lr,cr,pr,_t,hr,fn,ur,mr,fr,le,gr,vt,_r,vr,gn,kr,br,Os,ne,wr,kt,yr,Tr,bt,$r,Mr,Ss,ce,Ce,_n,wt,zr,vn,xr,Ns,yt,Ds,zo,qr,Bs,Tt,Us,se,Cr,kn,Fr,Pr,$t,Er,jr,Vs,Mt,Gs,pe,Fe,bn,zt,Ar,wn,Ir,Rs,I,yn,xo,Lr,Or,Tn,qo,Sr,Nr,$n,Co,Dr,Br,Mn,Fo,Ur,Vr,zn,Po,Gr,Rr,xn,Eo,Wr,Ws,he,Pe,qn,xt,Qr,Cn,Hr,Qs,G,qt,Jr,ue,Yr,jo,Xr,Zr,Ct,Kr,ei,ti,me,oi,Ao,ni,si,Io,ai,ri,ii,Ee,Hs,fe,je,Fn,Ft,di,Pn,li,Js,x,Pt,ci,En,pi,hi,jn,ui,mi,Ae,fi,Et,gi,An,_i,vi,ki,Ie,bi,jt,wi,Lo,yi,Ti,$i,ae,At,Mi,In,zi,xi,It,Oo,qi,Ln,Ci,Fi,So,Pi,On,Ei,ji,Le,Lt,Ai,Sn,Ii,Li,Oe,Ot,Oi,Nn,Si,Ni,Se,St,Di,Nt,Bi,Dn,Ui,Vi,Ys,ge,Ne,Bn,Dt,Gi,Un,Ri,Xs,F,Bt,Wi,Ut,Qi,Vn,Hi,Ji,Yi,Gn,Xi,Zi,De,Ki,Vt,ed,Rn,td,od,nd,Be,sd,Gt,ad,No,rd,id,dd,Ue,Rt,ld,Wn,cd,Zs,_e,Ve,Qn,Wt,pd,Hn,hd,Ks,R,Qt,ud,Ht,md,Do,fd,gd,_d,Jt,vd,Yt,kd,bd,wd,Y,Xt,yd,ve,Td,Bo,$d,Md,Jn,zd,xd,qd,Ge,Cd,Re,ea,ke,We,Yn,Zt,Fd,Xn,Pd,ta,W,Kt,Ed,eo,jd,Uo,Ad,Id,Ld,to,Od,oo,Sd,Nd,Dd,P,no,Bd,be,Ud,Vo,Vd,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,ul,ml,E,co,fl,ye,gl,Ro,_l,vl,as,kl,bl,wl,Xe,yl,rs,Tl,$l,po,Ml,is,zl,xl,ql,Ze,Cl,ds,Fl,Pl,Ke,sa,Te,et,ls,ho,El,cs,jl,aa,B,uo,Al,$e,Il,ps,Ll,Ol,hs,Sl,Nl,Dl,mo,Bl,Wo,Ul,Vl,Gl,fo,Rl,go,Wl,Ql,Hl,j,_o,Jl,Me,Yl,Qo,Xl,Zl,us,Kl,ec,tc,tt,oc,ms,nc,sc,Ho,ac,fs,rc,ic,ot,dc,gs,lc,cc,nt,ra,ze,st,_s,vo,pc,vs,hc,ia,xe,ko,uc,at,bo,mc,rt,da;return h=new Z({}),ht=new Z({}),wt=new Z({}),yt=new U({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 U({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 U({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.27.1/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.27.1/src/transformers/models/mvp/configuration_mvp.py#L29"}}),Ee=new te({props:{anchor:"transformers.MvpConfig.example",$$slots:{default:[mh]},$$scope:{ctx:z}}}),Ft=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.27.1/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.27.1/src/transformers/models/mvp/tokenization_mvp.py#L325",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.27.1/src/transformers/models/mvp/tokenization_mvp.py#L290"}}),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.27.1/src/transformers/models/mvp/tokenization_mvp.py#L377",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.27.1/src/transformers/models/mvp/tokenization_mvp.py#L350",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({}),Bt=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.27.1/src/transformers/models/mvp/tokenization_mvp_fast.py#L53"}}),De=new te({props:{anchor:"transformers.MvpTokenizerFast.example",$$slots:{default:[_h]},$$scope:{ctx:z}}}),Be=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.27.1/src/transformers/models/mvp/tokenization_mvp_fast.py#L266",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.27.1/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.27.1/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.27.1/src/transformers/models/mvp/modeling_mvp.py#L1292"}}),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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MvpModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.MvpModel.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Mvp uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.MvpModel.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read <code>modeling_mvp._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.MvpModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.MvpModel.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.MvpModel.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.MvpModel.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.MvpModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): Optionally, instead of passing <code>input_ids</code> you
can choose to directly pass an embedded representation. This is useful if you want more control over how to
convert <code>input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"past_key_values"},{anchor:"transformers.MvpModel.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.MvpModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.MvpModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.MvpModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.MvpModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/mvp/modeling_mvp.py#L1331",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/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.27.1/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.27.1/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.27.1/src/transformers/models/mvp/modeling_mvp.py#L1429"}}),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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MvpForConditionalGeneration.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.MvpForConditionalGeneration.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Mvp uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.MvpForConditionalGeneration.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read <code>modeling_mvp._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.MvpForConditionalGeneration.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.MvpForConditionalGeneration.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.MvpForConditionalGeneration.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.MvpForConditionalGeneration.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.MvpForConditionalGeneration.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): Optionally, instead of passing <code>input_ids</code> you
can choose to directly pass an embedded representation. This is useful if you want more control over how to
convert <code>input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"past_key_values"},{anchor:"transformers.MvpForConditionalGeneration.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.MvpForConditionalGeneration.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.MvpForConditionalGeneration.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.MvpForConditionalGeneration.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.MvpForConditionalGeneration.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/mvp/modeling_mvp.py#L1471",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/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.27.1/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.27.1/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.27.1/src/transformers/models/mvp/modeling_mvp.py#L1601"}}),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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MvpForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.MvpForSequenceClassification.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Mvp uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.MvpForSequenceClassification.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read <code>modeling_mvp._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.MvpForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.MvpForSequenceClassification.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.MvpForSequenceClassification.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.MvpForSequenceClassification.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.MvpForSequenceClassification.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): Optionally, instead of passing <code>input_ids</code> you
can choose to directly pass an embedded representation. This is useful if you want more control over how to
convert <code>input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"past_key_values"},{anchor:"transformers.MvpForSequenceClassification.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.MvpForSequenceClassification.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.MvpForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.MvpForSequenceClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.MvpForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/mvp/modeling_mvp.py#L1622"}}),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({}),uo=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.27.1/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.27.1/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.27.1/src/transformers/models/mvp/modeling_mvp.py#L1729"}}),_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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MvpForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.MvpForQuestionAnswering.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Mvp uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.MvpForQuestionAnswering.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read <code>modeling_mvp._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.MvpForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.MvpForQuestionAnswering.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.MvpForQuestionAnswering.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.MvpForQuestionAnswering.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.MvpForQuestionAnswering.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): Optionally, instead of passing <code>input_ids</code> you
can choose to directly pass an embedded representation. This is useful if you want more control over how to
convert <code>input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"past_key_values"},{anchor:"transformers.MvpForQuestionAnswering.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.MvpForQuestionAnswering.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.MvpForQuestionAnswering.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.MvpForQuestionAnswering.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.MvpForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/mvp/modeling_mvp.py#L1749"}}),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:[Ch]},$$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.27.1/src/transformers/models/mvp/modeling_mvp.py#L1861"}}),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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MvpForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.MvpForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention
if the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.MvpForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used
in the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:`,name:"encoder_attention_mask"},{anchor:"transformers.MvpForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.MvpForCausalLM.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.MvpForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of
shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>. The two additional
tensors are only required when the model is used as a decoder in a Sequence to Sequence model.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the
cross-attention blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those
that don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of
all <code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.MvpForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"},{anchor:"transformers.MvpForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding
(see <code>past_key_values</code>).</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"use_cache"},{anchor:"transformers.MvpForCausalLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under
returned tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.MvpForCausalLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors
for more detail.`,name:"output_hidden_states"},{anchor:"transformers.MvpForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/mvp/modeling_mvp.py#L1898",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/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:[Fh]},$$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"),V=c(),Q=n("h2"),K=n("a"),dn=n("span"),k(ht.$$.fragment),Ga=c(),ln=n("span"),Ra=r("Overview"),Es=c(),qe=n("p"),Wa=r("The MVP model was proposed in "),ut=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."),js=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(),un=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"),mt=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 "),mn=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"),ur=r("MvpForConditionalGeneration.from_pretrained('RUCAIBox/mvp-summarization')"),mr=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"),Ce=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."),Bs=c(),k(Tt.$$.fragment),Us=c(),se=n("p"),Cr=r("For lightweight tuning, "),kn=n("em"),Fr=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"),Er=r("original paper"),jr=r("."),Vs=c(),k(Mt.$$.fragment),Gs=c(),pe=n("h2"),Fe=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"),Co=n("a"),Dr=r("Causal language modeling task guide"),Br=c(),Mn=n("li"),Fo=n("a"),Ur=r("Masked language modeling task guide"),Vr=c(),zn=n("li"),Po=n("a"),Gr=r("Translation task guide"),Rr=c(),xn=n("li"),Eo=n("a"),Wr=r("Summarization task guide"),Ws=c(),he=n("h2"),Pe=n("a"),qn=n("span"),k(xt.$$.fragment),Qr=c(),Cn=n("span"),Hr=r("MvpConfig"),Qs=c(),G=n("div"),k(qt.$$.fragment),Jr=c(),ue=n("p"),Yr=r("This is the configuration class to store the configuration of a "),jo=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 `),Ct=n("a"),Kr=r("RUCAIBox/mvp"),ei=r(`
architecture.`),ti=c(),me=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(Ee.$$.fragment),Hs=c(),fe=n("h2"),je=n("a"),Fn=n("span"),k(Ft.$$.fragment),di=c(),Pn=n("span"),li=r("MvpTokenizer"),Js=c(),x=n("div"),k(Pt.$$.fragment),ci=c(),En=n("p"),pi=r("Constructs a MVP tokenizer, which is smilar to the RoBERTa tokenizer, using byte-level Byte-Pair-Encoding."),hi=c(),jn=n("p"),ui=r("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),mi=c(),k(Ae.$$.fragment),fi=c(),Et=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(),jt=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"),Ci=r("<s> X </s>"),Fi=c(),So=n("li"),Pi=r("pair of sequences: "),On=n("code"),Ei=r("<s> A </s></s> B </s>"),ji=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"),Bi=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"),Ui=r("prepare_for_model"),Vi=r(" method."),Ys=c(),ge=n("h2"),Ne=n("a"),Bn=n("span"),k(Dt.$$.fragment),Gi=c(),Un=n("span"),Ri=r("MvpTokenizerFast"),Xs=c(),F=n("div"),k(Bt.$$.fragment),Wi=c(),Ut=n("p"),Qi=r("Construct a \u201Cfast\u201D MVP tokenizer (backed by HuggingFace\u2019s "),Vn=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(),Vt=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(Be.$$.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(),Ue=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"),Ve=n("a"),Qn=n("span"),k(Wt.$$.fragment),pd=c(),Hn=n("span"),hd=r("MvpModel"),Ks=c(),R=n("div"),k(Qt.$$.fragment),ud=c(),Ht=n("p"),md=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 "),Bo=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),Cd=c(),k(Re.$$.fragment),ea=c(),ke=n("h2"),We=n("a"),Yn=n("span"),k(Zt.$$.fragment),Fd=c(),Xn=n("span"),Pd=r("MvpForConditionalGeneration"),ta=c(),W=n("div"),k(Kt.$$.fragment),Ed=c(),eo=n("p"),jd=r(`The MVP Model with a language modeling head. Can be used for various text generation tasks.
This model inherits from `),Uo=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),Bd=c(),be=n("p"),Ud=r("The "),Vo=n("a"),Vd=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"),ul=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ml=c(),E=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),Cl=c(),ds=n("p"),Fl=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),El=c(),cs=n("span"),jl=r("MvpForQuestionAnswering"),aa=c(),B=n("div"),k(uo.$$.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(),mo=n("p"),Bl=r("This model inherits from "),Wo=n("a"),Ul=r("PreTrainedModel"),Vl=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(),j=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 "),us=n("code"),Kl=r("__call__"),ec=r(" special method."),tc=c(),k(tt.$$.fragment),oc=c(),ms=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),uc=c(),at=n("div"),k(bo.$$.fragment),mc=c(),k(rt.$$.fragment),this.h()},l(t){const m=hh('[data-svelte="svelte-1phssyn"]',document.head);d=s(m,"META",{name:!0,content:!0}),m.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),V=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),Es=p(t),qe=s(t,"P",{});var To=a(qe);Wa=i(To,"The MVP model was proposed in "),ut=s(To,"A",{href:!0,rel:!0});var Ms=a(ut);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),js=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 Cs=a(hn);er=i(Cs,"MVP also has task-specific soft prompts to stimulate the model\u2019s capacity in performing a certain task."),Cs.forEach(o),tr=p(ee),un=s(ee,"LI",{});var Fs=a(un);or=i(Fs,"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."),Fs.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);mt=s(it,"LI",{});var la=a(mt);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 "),mn=s(ca,"CODE",{});var kc=a(mn);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);ur=i(bc,"MvpForConditionalGeneration.from_pretrained('RUCAIBox/mvp-summarization')"),bc.forEach(o),mr=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);Ce=s(ha,"A",{id:!0,class:!0,href:!0});var Mc=a(Ce);_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),Bs=p(t),b(Tt.$$.fragment,t),Us=p(t),se=s(t,"P",{});var Xo=a(se);Cr=i(Xo,"For lightweight tuning, "),kn=s(Xo,"EM",{});var Cc=a(kn);Fr=i(Cc,"i.e."),Cc.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 Fc=a($t);Er=i(Fc,"original paper"),Fc.forEach(o),jr=i(Xo,"."),Xo.forEach(o),Vs=p(t),b(Mt.$$.fragment,t),Gs=p(t),pe=s(t,"H2",{class:!0});var ua=a(pe);Fe=s(ua,"A",{id:!0,class:!0,href:!0});var Pc=a(Fe);bn=s(Pc,"SPAN",{});var Ec=a(bn);b(zt.$$.fragment,Ec),Ec.forEach(o),Pc.forEach(o),Ar=p(ua),wn=s(ua,"SPAN",{});var jc=a(wn);Ir=i(jc,"Documentation resources"),jc.forEach(o),ua.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);Co=s(Sc,"A",{href:!0});var Nc=a(Co);Dr=i(Nc,"Causal language modeling task guide"),Nc.forEach(o),Sc.forEach(o),Br=p(X),Mn=s(X,"LI",{});var Dc=a(Mn);Fo=s(Dc,"A",{href:!0});var Bc=a(Fo);Ur=i(Bc,"Masked language modeling task guide"),Bc.forEach(o),Dc.forEach(o),Vr=p(X),zn=s(X,"LI",{});var Uc=a(zn);Po=s(Uc,"A",{href:!0});var Vc=a(Po);Gr=i(Vc,"Translation task guide"),Vc.forEach(o),Uc.forEach(o),Rr=p(X),xn=s(X,"LI",{});var Gc=a(xn);Eo=s(Gc,"A",{href:!0});var Rc=a(Eo);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 ma=a(he);Pe=s(ma,"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(ma),Cn=s(ma,"SPAN",{});var Hc=a(Cn);Hr=i(Hc,"MvpConfig"),Hc.forEach(o),ma.forEach(o),Qs=p(t),G=s(t,"DIV",{class:!0});var dt=a(G);b(qt.$$.fragment,dt),Jr=p(dt),ue=s(dt,"P",{});var Zo=a(ue);Yr=i(Zo,"This is the configuration class to store the configuration of a "),jo=s(Zo,"A",{href:!0});var Jc=a(jo);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 `),Ct=s(Zo,"A",{href:!0,rel:!0});var Yc=a(Ct);Kr=i(Yc,"RUCAIBox/mvp"),Yc.forEach(o),ei=i(Zo,`
architecture.`),Zo.forEach(o),ti=p(dt),me=s(dt,"P",{});var Ko=a(me);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(Ee.$$.fragment,dt),dt.forEach(o),Hs=p(t),fe=s(t,"H2",{class:!0});var fa=a(fe);je=s(fa,"A",{id:!0,class:!0,href:!0});var Kc=a(je);Fn=s(Kc,"SPAN",{});var ep=a(Fn);b(Ft.$$.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 C=a(x);b(Pt.$$.fragment,C),ci=p(C),En=s(C,"P",{});var op=a(En);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(C),jn=s(C,"P",{});var np=a(jn);ui=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),mi=p(C),b(Ae.$$.fragment,C),fi=p(C),Et=s(C,"P",{});var ga=a(Et);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(C),b(Ie.$$.fragment,C),bi=p(C),jt=s(C,"P",{});var _a=a(jt);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(C),ae=s(C,"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);Ci=i(ip,"<s> X </s>"),ip.forEach(o),fc.forEach(o),Fi=p(va),So=s(va,"LI",{});var gc=a(So);Pi=i(gc,"pair of sequences: "),On=s(gc,"CODE",{});var dp=a(On);Ei=i(dp,"<s> A </s></s> B </s>"),dp.forEach(o),gc.forEach(o),va.forEach(o),en.forEach(o),ji=p(C),Le=s(C,"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(C),Oe=s(C,"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(C),Se=s(C,"DIV",{class:!0});var wa=a(Se);b(St.$$.fragment,wa),Di=p(wa),Nt=s(wa,"P",{});var ya=a(Nt);Bi=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);Ui=i(pp,"prepare_for_model"),pp.forEach(o),Vi=i(ya," method."),ya.forEach(o),wa.forEach(o),C.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);Bn=s(hp,"SPAN",{});var up=a(Bn);b(Dt.$$.fragment,up),up.forEach(o),hp.forEach(o),Gi=p(Ta),Un=s(Ta,"SPAN",{});var mp=a(Un);Ri=i(mp,"MvpTokenizerFast"),mp.forEach(o),Ta.forEach(o),Xs=p(t),F=s(t,"DIV",{class:!0});var L=a(F);b(Bt.$$.fragment,L),Wi=p(L),Ut=s(L,"P",{});var $a=a(Ut);Qi=i($a,"Construct a \u201Cfast\u201D MVP tokenizer (backed by HuggingFace\u2019s "),Vn=s($a,"EM",{});var fp=a(Vn);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),Vt=s(L,"P",{});var Ma=a(Vt);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(Be.$$.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),Ue=s(L,"DIV",{class:!0});var xa=a(Ue);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);Ve=s(qa,"A",{id:!0,class:!0,href:!0});var bp=a(Ve);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),ud=p(lt),Ht=s(lt,"P",{});var Ca=a(Ht);md=i(Ca,`The bare MVP Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Do=s(Ca,"A",{href:!0});var Tp=a(Do);fd=i(Tp,"PreTrainedModel"),Tp.forEach(o),gd=i(Ca,`. 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.)`),Ca.forEach(o),_d=p(lt),Jt=s(lt,"P",{});var Fa=a(Jt);vd=i(Fa,"This model is also a PyTorch "),Yt=s(Fa,"A",{href:!0,rel:!0});var $p=a(Yt);kd=i($p,"torch.nn.Module"),$p.forEach(o),bd=i(Fa,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Fa.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 "),Bo=s(tn,"A",{href:!0});var Mp=a(Bo);$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),Cd=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),Fd=p(Pa),Xn=s(Pa,"SPAN",{});var Cp=a(Xn);Pd=i(Cp,"MvpForConditionalGeneration"),Cp.forEach(o),Pa.forEach(o),ta=p(t),W=s(t,"DIV",{class:!0});var pt=a(W);b(Kt.$$.fragment,pt),Ed=p(pt),eo=s(pt,"P",{});var Ea=a(eo);jd=i(Ea,`The MVP Model with a language modeling head. Can be used for various text generation tasks.
This model inherits from `),Uo=s(Ea,"A",{href:!0});var Fp=a(Uo);Ad=i(Fp,"PreTrainedModel"),Fp.forEach(o),Id=i(Ea,`. 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.)`),Ea.forEach(o),Ld=p(pt),to=s(pt,"P",{});var ja=a(to);Od=i(ja,"This model is also a PyTorch "),oo=s(ja,"A",{href:!0,rel:!0});var Pp=a(oo);Sd=i(Pp,"torch.nn.Module"),Pp.forEach(o),Nd=i(ja,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ja.forEach(o),Dd=p(pt),P=s(pt,"DIV",{class:!0});var O=a(P);b(no.$$.fragment,O),Bd=p(O),be=s(O,"P",{});var on=a(be);Ud=i(on,"The "),Vo=s(on,"A",{href:!0});var Ep=a(Vo);Vd=i(Ep,"MvpForConditionalGeneration"),Ep.forEach(o),Gd=i(on," forward method, overrides the "),Zn=s(on,"CODE",{});var jp=a(Zn);Rd=i(jp,"__call__"),jp.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 Bp=a(Go);dl=i(Bp,"PreTrainedModel"),Bp.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 Up=a(lo);hl=i(Up,"torch.nn.Module"),Up.forEach(o),ul=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),ml=p(re),E=s(re,"DIV",{class:!0});var S=a(E);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 Vp=a(Ro);_l=i(Vp,"MvpForSequenceClassification"),Vp.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),Cl=p(S),ds=s(S,"P",{});var Qp=a(ds);Fl=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),El=p(Sa),cs=s(Sa,"SPAN",{});var Yp=a(cs);jl=i(Yp,"MvpForQuestionAnswering"),Yp.forEach(o),Sa.forEach(o),aa=p(t),B=s(t,"DIV",{class:!0});var ie=a(B);b(uo.$$.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),mo=s(ie,"P",{});var Na=a(mo);Bl=i(Na,"This model inherits from "),Wo=s(Na,"A",{href:!0});var Kp=a(Wo);Ul=i(Kp,"PreTrainedModel"),Kp.forEach(o),Vl=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),j=s(ie,"DIV",{class:!0});var N=a(j);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 "),us=s(an,"CODE",{});var oh=a(us);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),ms=s(N,"P",{});var nh=a(ms);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 Ba=a(ze);st=s(Ba,"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(Ba),vs=s(Ba,"SPAN",{});var dh=a(vs);hc=i(dh,"MvpForCausalLM"),dh.forEach(o),Ba.forEach(o),ia=p(t),xe=s(t,"DIV",{class:!0});var Ua=a(xe);b(ko.$$.fragment,Ua),uc=p(Ua),at=s(Ua,"DIV",{class:!0});var Va=a(at);b(bo.$$.fragment,Va),mc=p(Va),b(rt.$$.fragment,Va),Va.forEach(o),Ua.forEach(o),this.h()},h(){u(d,"name","hf:doc:metadata"),u(d,"content",JSON.stringify(Eh)),u(f,"id","mvp"),u(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"),u(f,"href","#mvp"),u(l,"class","relative group"),u(K,"id","overview"),u(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"),u(K,"href","#overview"),u(Q,"class","relative group"),u(ut,"href","https://arxiv.org/abs/2206.12131"),u(ut,"rel","nofollow"),u(ft,"href","https://huggingface.co/models?filter=mvp"),u(ft,"rel","nofollow"),u(vt,"href","https://arxiv.org/abs/2101.00190"),u(vt,"rel","nofollow"),u(kt,"href","https://huggingface.co/StevenTang"),u(kt,"rel","nofollow"),u(bt,"href","https://github.com/RUCAIBox/MVP"),u(bt,"rel","nofollow"),u(Ce,"id","examples"),u(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"),u(Ce,"href","#examples"),u(ce,"class","relative group"),u($t,"href","https://arxiv.org/abs/2101.00190"),u($t,"rel","nofollow"),u(Fe,"id","documentation-resources"),u(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"),u(Fe,"href","#documentation-resources"),u(pe,"class","relative group"),u(xo,"href","./tasks/sequence_classification"),u(qo,"href","./tasks/question_answering"),u(Co,"href","./tasks/language_modeling"),u(Fo,"href","./tasks/masked_language_modeling"),u(Po,"href","./tasks/translation"),u(Eo,"href","./tasks/summarization"),u(Pe,"id","transformers.MvpConfig"),u(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"),u(Pe,"href","#transformers.MvpConfig"),u(he,"class","relative group"),u(jo,"href","/docs/transformers/v4.27.1/en/model_doc/mvp#transformers.MvpModel"),u(Ct,"href","https://huggingface.co/RUCAIBox/mvp"),u(Ct,"rel","nofollow"),u(Ao,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),u(Io,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),u(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(je,"id","transformers.MvpTokenizer"),u(je,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(je,"href","#transformers.MvpTokenizer"),u(fe,"class","relative group"),u(Lo,"href","/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),u(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ne,"id","transformers.MvpTokenizerFast"),u(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"),u(Ne,"href","#transformers.MvpTokenizerFast"),u(ge,"class","relative group"),u(No,"href","/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),u(Ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ve,"id","transformers.MvpModel"),u(Ve,"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"),u(Ve,"href","#transformers.MvpModel"),u(_e,"class","relative group"),u(Do,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),u(Yt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Yt,"rel","nofollow"),u(Bo,"href","/docs/transformers/v4.27.1/en/model_doc/mvp#transformers.MvpModel"),u(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(We,"id","transformers.MvpForConditionalGeneration"),u(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"),u(We,"href","#transformers.MvpForConditionalGeneration"),u(ke,"class","relative group"),u(Uo,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),u(oo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(oo,"rel","nofollow"),u(Vo,"href","/docs/transformers/v4.27.1/en/model_doc/mvp#transformers.MvpForConditionalGeneration"),u(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ye,"id","transformers.MvpForSequenceClassification"),u(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"),u(Ye,"href","#transformers.MvpForSequenceClassification"),u(we,"class","relative group"),u(Go,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),u(lo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(lo,"rel","nofollow"),u(Ro,"href","/docs/transformers/v4.27.1/en/model_doc/mvp#transformers.MvpForSequenceClassification"),u(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(et,"id","transformers.MvpForQuestionAnswering"),u(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"),u(et,"href","#transformers.MvpForQuestionAnswering"),u(Te,"class","relative group"),u(Wo,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),u(go,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(go,"rel","nofollow"),u(Qo,"href","/docs/transformers/v4.27.1/en/model_doc/mvp#transformers.MvpForQuestionAnswering"),u(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(st,"id","transformers.MvpForCausalLM"),u(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"),u(st,"href","#transformers.MvpForCausalLM"),u(ze,"class","relative group"),u(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(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,m){e(document.head,d),v(t,g,m),v(t,l,m),e(l,f),e(f,M),w(h,M,null),e(l,_),e(l,q),e(q,de),v(t,V,m),v(t,Q,m),e(Q,K),e(K,dn),w(ht,dn,null),e(Q,Ga),e(Q,ln),e(ln,Ra),v(t,Es,m),v(t,qe,m),e(qe,Wa),e(qe,ut),e(ut,Qa),e(qe,Ha),v(t,js,m),v(t,$o,m),e($o,Ja),v(t,As,m),v(t,H,m),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,un),e(un,or),v(t,Is,m),v(t,Mo,m),e(Mo,nr),v(t,Ls,m),v(t,J,m),e(J,mt),e(mt,sr),e(mt,ft),e(ft,ar),e(mt,rr),e(J,ir),e(J,gt),e(gt,dr),e(gt,mn),e(mn,lr),e(gt,cr),e(J,pr),e(J,_t),e(_t,hr),e(_t,fn),e(fn,ur),e(_t,mr),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,m),v(t,ne,m),e(ne,wr),e(ne,kt),e(kt,yr),e(ne,Tr),e(ne,bt),e(bt,$r),e(ne,Mr),v(t,Ss,m),v(t,ce,m),e(ce,Ce),e(Ce,_n),w(wt,_n,null),e(ce,zr),e(ce,vn),e(vn,xr),v(t,Ns,m),w(yt,t,m),v(t,Ds,m),v(t,zo,m),e(zo,qr),v(t,Bs,m),w(Tt,t,m),v(t,Us,m),v(t,se,m),e(se,Cr),e(se,kn),e(kn,Fr),e(se,Pr),e(se,$t),e($t,Er),e(se,jr),v(t,Vs,m),w(Mt,t,m),v(t,Gs,m),v(t,pe,m),e(pe,Fe),e(Fe,bn),w(zt,bn,null),e(pe,Ar),e(pe,wn),e(wn,Ir),v(t,Rs,m),v(t,I,m),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,Co),e(Co,Dr),e(I,Br),e(I,Mn),e(Mn,Fo),e(Fo,Ur),e(I,Vr),e(I,zn),e(zn,Po),e(Po,Gr),e(I,Rr),e(I,xn),e(xn,Eo),e(Eo,Wr),v(t,Ws,m),v(t,he,m),e(he,Pe),e(Pe,qn),w(xt,qn,null),e(he,Qr),e(he,Cn),e(Cn,Hr),v(t,Qs,m),v(t,G,m),w(qt,G,null),e(G,Jr),e(G,ue),e(ue,Yr),e(ue,jo),e(jo,Xr),e(ue,Zr),e(ue,Ct),e(Ct,Kr),e(ue,ei),e(G,ti),e(G,me),e(me,oi),e(me,Ao),e(Ao,ni),e(me,si),e(me,Io),e(Io,ai),e(me,ri),e(G,ii),w(Ee,G,null),v(t,Hs,m),v(t,fe,m),e(fe,je),e(je,Fn),w(Ft,Fn,null),e(fe,di),e(fe,Pn),e(Pn,li),v(t,Js,m),v(t,x,m),w(Pt,x,null),e(x,ci),e(x,En),e(En,pi),e(x,hi),e(x,jn),e(jn,ui),e(x,mi),w(Ae,x,null),e(x,fi),e(x,Et),e(Et,gi),e(Et,An),e(An,_i),e(Et,vi),e(x,ki),w(Ie,x,null),e(x,bi),e(x,jt),e(jt,wi),e(jt,Lo),e(Lo,yi),e(jt,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,Ci),e(It,Fi),e(It,So),e(So,Pi),e(So,On),e(On,Ei),e(x,ji),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,Bi),e(Nt,Dn),e(Dn,Ui),e(Nt,Vi),v(t,Ys,m),v(t,ge,m),e(ge,Ne),e(Ne,Bn),w(Dt,Bn,null),e(ge,Gi),e(ge,Un),e(Un,Ri),v(t,Xs,m),v(t,F,m),w(Bt,F,null),e(F,Wi),e(F,Ut),e(Ut,Qi),e(Ut,Vn),e(Vn,Hi),e(Ut,Ji),e(F,Yi),e(F,Gn),e(Gn,Xi),e(F,Zi),w(De,F,null),e(F,Ki),e(F,Vt),e(Vt,ed),e(Vt,Rn),e(Rn,td),e(Vt,od),e(F,nd),w(Be,F,null),e(F,sd),e(F,Gt),e(Gt,ad),e(Gt,No),e(No,rd),e(Gt,id),e(F,dd),e(F,Ue),w(Rt,Ue,null),e(Ue,ld),e(Ue,Wn),e(Wn,cd),v(t,Zs,m),v(t,_e,m),e(_e,Ve),e(Ve,Qn),w(Wt,Qn,null),e(_e,pd),e(_e,Hn),e(Hn,hd),v(t,Ks,m),v(t,R,m),w(Qt,R,null),e(R,ud),e(R,Ht),e(Ht,md),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,Bo),e(Bo,$d),e(ve,Md),e(ve,Jn),e(Jn,zd),e(ve,xd),e(Y,qd),w(Ge,Y,null),e(Y,Cd),w(Re,Y,null),v(t,ea,m),v(t,ke,m),e(ke,We),e(We,Yn),w(Zt,Yn,null),e(ke,Fd),e(ke,Xn),e(Xn,Pd),v(t,ta,m),v(t,W,m),w(Kt,W,null),e(W,Ed),e(W,eo),e(eo,jd),e(eo,Uo),e(Uo,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,Bd),e(P,be),e(be,Ud),e(be,Vo),e(Vo,Vd),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,m),v(t,we,m),e(we,Ye),e(Ye,os),w(so,os,null),e(we,ol),e(we,ns),e(ns,nl),v(t,na,m),v(t,D,m),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,ul),e(D,ml),e(D,E),w(co,E,null),e(E,fl),e(E,ye),e(ye,gl),e(ye,Ro),e(Ro,_l),e(ye,vl),e(ye,as),e(as,kl),e(ye,bl),e(E,wl),w(Xe,E,null),e(E,yl),e(E,rs),e(rs,Tl),e(E,$l),e(E,po),e(po,Ml),e(po,is),e(is,zl),e(po,xl),e(E,ql),w(Ze,E,null),e(E,Cl),e(E,ds),e(ds,Fl),e(E,Pl),w(Ke,E,null),v(t,sa,m),v(t,Te,m),e(Te,et),e(et,ls),w(ho,ls,null),e(Te,El),e(Te,cs),e(cs,jl),v(t,aa,m),v(t,B,m),w(uo,B,null),e(B,Al),e(B,$e),e($e,Il),e($e,ps),e(ps,Ll),e($e,Ol),e($e,hs),e(hs,Sl),e($e,Nl),e(B,Dl),e(B,mo),e(mo,Bl),e(mo,Wo),e(Wo,Ul),e(mo,Vl),e(B,Gl),e(B,fo),e(fo,Rl),e(fo,go),e(go,Wl),e(fo,Ql),e(B,Hl),e(B,j),w(_o,j,null),e(j,Jl),e(j,Me),e(Me,Yl),e(Me,Qo),e(Qo,Xl),e(Me,Zl),e(Me,us),e(us,Kl),e(Me,ec),e(j,tc),w(tt,j,null),e(j,oc),e(j,ms),e(ms,nc),e(j,sc),e(j,Ho),e(Ho,ac),e(Ho,fs),e(fs,rc),e(j,ic),w(ot,j,null),e(j,dc),e(j,gs),e(gs,lc),e(j,cc),w(nt,j,null),v(t,ra,m),v(t,ze,m),e(ze,st),e(st,_s),w(vo,_s,null),e(ze,pc),e(ze,vs),e(vs,hc),v(t,ia,m),v(t,xe,m),w(ko,xe,null),e(xe,uc),e(xe,at),w(bo,at,null),e(at,mc),w(rt,at,null),da=!0},p(t,[m]){const wo={};m&2&&(wo.$$scope={dirty:m,ctx:t}),Ee.$set(wo);const ks={};m&2&&(ks.$$scope={dirty:m,ctx:t}),Ae.$set(ks);const bs={};m&2&&(bs.$$scope={dirty:m,ctx:t}),Ie.$set(bs);const ws={};m&2&&(ws.$$scope={dirty:m,ctx:t}),De.$set(ws);const yo={};m&2&&(yo.$$scope={dirty:m,ctx:t}),Be.$set(yo);const ys={};m&2&&(ys.$$scope={dirty:m,ctx:t}),Ge.$set(ys);const Ts={};m&2&&(Ts.$$scope={dirty:m,ctx:t}),Re.$set(Ts);const $s={};m&2&&($s.$$scope={dirty:m,ctx:t}),Qe.$set($s);const To={};m&2&&(To.$$scope={dirty:m,ctx:t}),He.$set(To);const Ms={};m&2&&(Ms.$$scope={dirty:m,ctx:t}),Je.$set(Ms);const zs={};m&2&&(zs.$$scope={dirty:m,ctx:t}),Xe.$set(zs);const ee={};m&2&&(ee.$$scope={dirty:m,ctx:t}),Ze.$set(ee);const xs={};m&2&&(xs.$$scope={dirty:m,ctx:t}),Ke.$set(xs);const qs={};m&2&&(qs.$$scope={dirty:m,ctx:t}),tt.$set(qs);const Cs={};m&2&&(Cs.$$scope={dirty:m,ctx:t}),ot.$set(Cs);const Fs={};m&2&&(Fs.$$scope={dirty:m,ctx:t}),nt.$set(Fs);const Ps={};m&2&&(Ps.$$scope={dirty:m,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(Ee.$$.fragment,t),y(Ft.$$.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(Bt.$$.fragment,t),y(De.$$.fragment,t),y(Be.$$.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(uo.$$.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(Ee.$$.fragment,t),T(Ft.$$.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(Bt.$$.fragment,t),T(De.$$.fragment,t),T(Be.$$.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(uo.$$.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(V),t&&o(Q),$(ht),t&&o(Es),t&&o(qe),t&&o(js),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(Bs),$(Tt,t),t&&o(Us),t&&o(se),t&&o(Vs),$(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),$(Ee),t&&o(Hs),t&&o(fe),$(Ft),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(F),$(Bt),$(De),$(Be),$(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(B),$(uo),$(_o),$(tt),$(ot),$(nt),t&&o(ra),t&&o(ze),$(vo),t&&o(ia),t&&o(xe),$(ko),$(bo),$(rt)}}}const Eh={local:"mvp",sections:[{local:"overview",title:"Overview"},{local:"examples",title:"Examples"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.MvpConfig",title:"MvpConfig"},{local:"transformers.MvpTokenizer",title:"MvpTokenizer"},{local:"transformers.MvpTokenizerFast",title:"MvpTokenizerFast"},{local:"transformers.MvpModel",title:"MvpModel"},{local:"transformers.MvpForConditionalGeneration",title:"MvpForConditionalGeneration"},{local:"transformers.MvpForSequenceClassification",title:"MvpForSequenceClassification"},{local:"transformers.MvpForQuestionAnswering",title:"MvpForQuestionAnswering"},{local:"transformers.MvpForCausalLM",title:"MvpForCausalLM"}],title:"MVP"};function jh(z){return uh(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Dh extends lh{constructor(d){super();ch(this,d,jh,Ph,ph,{})}}export{Dh as default,Eh as metadata};
