import{S as Ox,i as Ix,s as Nx,e as a,k as c,w as v,t as i,M as Dx,c as s,d as t,m as p,a as r,x as y,h as d,b as m,N as Sx,G as e,g,y as T,q as w,o as $,B as x,v as Lx,L as P}from"../../chunks/vendor-hf-doc-builder.js";import{T as kt}from"../../chunks/Tip-hf-doc-builder.js";import{D as F}from"../../chunks/Docstring-hf-doc-builder.js";import{C as E}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as R}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as A}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Gx(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import MBartConfig, MBartModel

# Initializing a MBART facebook/mbart-large-cc25 style configuration
configuration = MBartConfig()

# Initializing a model (with random weights) from the facebook/mbart-large-cc25 style configuration
model = MBartModel(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> MBartConfig, MBartModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a MBART facebook/mbart-large-cc25 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = MBartConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the facebook/mbart-large-cc25 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartModel(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(){l=a("p"),b=i("Example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function Wx(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import MBartTokenizer

tokenizer = MBartTokenizer.from_pretrained("facebook/mbart-large-en-ro", src_lang="en_XX", tgt_lang="ro_RO")
example_english_phrase = " UN Chief Says There Is No Military Solution in Syria"
expected_translation_romanian = "\u015Eeful ONU declar\u0103 c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria"
inputs = tokenizer(example_english_phrase, text_target=expected_translation_romanian, return_tensors="pt")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MBartTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MBartTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-en-ro&quot;</span>, src_lang=<span class="hljs-string">&quot;en_XX&quot;</span>, tgt_lang=<span class="hljs-string">&quot;ro_RO&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example_english_phrase = <span class="hljs-string">&quot; UN Chief Says There Is No Military Solution in Syria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>expected_translation_romanian = <span class="hljs-string">&quot;\u015Eeful ONU declar\u0103 c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(example_english_phrase, text_target=expected_translation_romanian, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)`}}),{c(){l=a("p"),b=i("Examples:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Examples:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function Ux(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import MBartTokenizerFast

tokenizer = MBartTokenizerFast.from_pretrained(
    "facebook/mbart-large-en-ro", src_lang="en_XX", tgt_lang="ro_RO"
)
example_english_phrase = " UN Chief Says There Is No Military Solution in Syria"
expected_translation_romanian = "\u015Eeful ONU declar\u0103 c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria"
inputs = tokenizer(example_english_phrase, text_target=expected_translation_romanian, return_tensors="pt")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MBartTokenizerFast

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MBartTokenizerFast.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/mbart-large-en-ro&quot;</span>, src_lang=<span class="hljs-string">&quot;en_XX&quot;</span>, tgt_lang=<span class="hljs-string">&quot;ro_RO&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example_english_phrase = <span class="hljs-string">&quot; UN Chief Says There Is No Military Solution in Syria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>expected_translation_romanian = <span class="hljs-string">&quot;\u015Eeful ONU declar\u0103 c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(example_english_phrase, text_target=expected_translation_romanian, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)`}}),{c(){l=a("p"),b=i("Examples:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Examples:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function Rx(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import MBart50Tokenizer

tokenizer = MBart50Tokenizer.from_pretrained("facebook/mbart-large-50", src_lang="en_XX", tgt_lang="ro_RO")
src_text = " UN Chief Says There Is No Military Solution in Syria"
tgt_text = "\u015Eeful ONU declar\u0103 c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria"
model_inputs = tokenizer(src_text, text_target=tgt_text, return_tensors="pt")
# model(**model_inputs) should work`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MBart50Tokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MBart50Tokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-50&quot;</span>, src_lang=<span class="hljs-string">&quot;en_XX&quot;</span>, tgt_lang=<span class="hljs-string">&quot;ro_RO&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>src_text = <span class="hljs-string">&quot; UN Chief Says There Is No Military Solution in Syria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tgt_text = <span class="hljs-string">&quot;\u015Eeful ONU declar\u0103 c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model_inputs = tokenizer(src_text, text_target=tgt_text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model(**model_inputs) should work</span>`}}),{c(){l=a("p"),b=i("Examples:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Examples:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function Xx(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import MBart50TokenizerFast

tokenizer = MBart50TokenizerFast.from_pretrained("facebook/mbart-large-50", src_lang="en_XX", tgt_lang="ro_RO")
src_text = " UN Chief Says There Is No Military Solution in Syria"
tgt_text = "\u015Eeful ONU declar\u0103 c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria"
model_inputs = tokenizer(src_text, text_target=tgt_text, return_tensors="pt")
# model(**model_inputs) should work`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MBart50TokenizerFast

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MBart50TokenizerFast.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-50&quot;</span>, src_lang=<span class="hljs-string">&quot;en_XX&quot;</span>, tgt_lang=<span class="hljs-string">&quot;ro_RO&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>src_text = <span class="hljs-string">&quot; UN Chief Says There Is No Military Solution in Syria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tgt_text = <span class="hljs-string">&quot;\u015Eeful ONU declar\u0103 c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model_inputs = tokenizer(src_text, text_target=tgt_text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model(**model_inputs) should work</span>`}}),{c(){l=a("p"),b=i("Examples:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Examples:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function Qx(M){let l,b,f,h,k;return{c(){l=a("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),h=i("Module"),k=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.`)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var q=r(f);h=d(q,"Module"),q.forEach(t),k=d(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(n,u){g(n,l,u),e(l,b),e(l,f),e(f,h),e(l,k)},d(n){n&&t(l)}}}function Hx(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import AutoTokenizer, MBartModel
import torch

tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-cc25")
model = MBartModel.from_pretrained("facebook/mbart-large-cc25")

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, MBartModel
<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;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartModel.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&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(){l=a("p"),b=i("Example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function Vx(M){let l,b,f,h,k;return{c(){l=a("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),h=i("Module"),k=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.`)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var q=r(f);h=d(q,"Module"),q.forEach(t),k=d(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(n,u){g(n,l,u),e(l,b),e(l,f),e(f,h),e(l,k)},d(n){n&&t(l)}}}function Kx(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import AutoTokenizer, MBartForConditionalGeneration

model = MBartForConditionalGeneration.from_pretrained("facebook/mbart-large-en-ro")
tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-en-ro")

example_english_phrase = "42 is the answer"
inputs = tokenizer(example_english_phrase, return_tensors="pt")

# Translate
generated_ids = model.generate(**inputs, num_beams=4, max_length=5)
tokenizer.batch_decode(generated_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-en-ro&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-en-ro&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>example_english_phrase = <span class="hljs-string">&quot;42 is the answer&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(example_english_phrase, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Translate</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(**inputs, num_beams=<span class="hljs-number">4</span>, max_length=<span class="hljs-number">5</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>, clean_up_tokenization_spaces=<span class="hljs-literal">False</span>)[<span class="hljs-number">0</span>]
<span class="hljs-string">&#x27;42 este r\u0103spuns&#x27;</span>`}}),{c(){l=a("p"),b=i("Translation example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Translation example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function Jx(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import AutoTokenizer, MBartForConditionalGeneration

model = MBartForConditionalGeneration.from_pretrained("facebook/mbart-large-cc25")
tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-cc25")

# de_DE is the language symbol id <LID> for German
TXT = "</s> Meine Freunde sind <mask> nett aber sie essen zu viel Kuchen. </s> de_DE"

input_ids = tokenizer([TXT], add_special_tokens=False, return_tensors="pt")["input_ids"]
logits = model(input_ids).logits

masked_index = (input_ids[0] == tokenizer.mask_token_id).nonzero().item()
probs = logits[0, masked_index].softmax(dim=0)
values, predictions = probs.topk(5)

tokenizer.decode(predictions).split()`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># de_DE is the language symbol id &lt;LID&gt; for German</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>TXT = <span class="hljs-string">&quot;&lt;/s&gt; Meine Freunde sind &lt;mask&gt; nett aber sie essen zu viel Kuchen. &lt;/s&gt; de_DE&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer([TXT], add_special_tokens=<span class="hljs-literal">False</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>logits = model(input_ids).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>masked_index = (input_ids[<span class="hljs-number">0</span>] == tokenizer.mask_token_id).nonzero().item()
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = logits[<span class="hljs-number">0</span>, masked_index].softmax(dim=<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>values, predictions = probs.topk(<span class="hljs-number">5</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predictions).split()
[<span class="hljs-string">&#x27;nett&#x27;</span>, <span class="hljs-string">&#x27;sehr&#x27;</span>, <span class="hljs-string">&#x27;ganz&#x27;</span>, <span class="hljs-string">&#x27;nicht&#x27;</span>, <span class="hljs-string">&#x27;so&#x27;</span>]`}}),{c(){l=a("p"),b=i("Mask filling example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Mask filling example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function Zx(M){let l,b,f,h,k;return{c(){l=a("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),h=i("Module"),k=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.`)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var q=r(f);h=d(q,"Module"),q.forEach(t),k=d(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(n,u){g(n,l,u),e(l,b),e(l,f),e(f,h),e(l,k)},d(n){n&&t(l)}}}function Yx(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import AutoTokenizer, MBartForQuestionAnswering
import torch

tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-cc25")
model = MBartForQuestionAnswering.from_pretrained("facebook/mbart-large-cc25")

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"

inputs = tokenizer(question, text, return_tensors="pt")
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]

# target is "nice puppet"
target_start_index = torch.tensor([14])
target_end_index = torch.tensor([15])

outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
loss = outputs.loss`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MBartForQuestionAnswering
<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;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><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><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = torch.tensor([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = torch.tensor([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss`}}),{c(){l=a("p"),b=i("Example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function e1(M){let l,b,f,h,k;return{c(){l=a("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),h=i("Module"),k=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.`)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var q=r(f);h=d(q,"Module"),q.forEach(t),k=d(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(n,u){g(n,l,u),e(l,b),e(l,f),e(f,h),e(l,k)},d(n){n&&t(l)}}}function t1(M){let l,b,f,h,k;return h=new E({props:{code:`import torch
from transformers import AutoTokenizer, MBartForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-cc25")
model = MBartForSequenceClassification.from_pretrained("facebook/mbart-large-cc25")

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

with torch.no_grad():
    logits = model(**inputs).logits

predicted_class_id = logits.argmax().item()

# To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`
num_labels = len(model.config.id2label)
model = MBartForSequenceClassification.from_pretrained("facebook/mbart-large-cc25", num_labels=num_labels)

labels = torch.tensor([1])
loss = model(**inputs, labels=labels).loss`,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, MBartForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&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><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().item()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){l=a("p"),b=i("Example of single-label classification:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example of single-label classification:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function o1(M){let l,b,f,h,k;return h=new E({props:{code:`import torch
from transformers import AutoTokenizer, MBartForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-cc25")
model = MBartForSequenceClassification.from_pretrained("facebook/mbart-large-cc25", problem_type="multi_label_classification")

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

with torch.no_grad():
    logits = model(**inputs).logits

predicted_class_ids = torch.arange(0, logits.shape[-1])[torch.sigmoid(logits).squeeze(dim=0) > 0.5]

# To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`
num_labels = len(model.config.id2label)
model = MBartForSequenceClassification.from_pretrained(
    "facebook/mbart-large-cc25", num_labels=num_labels, problem_type="multi_label_classification"
)

labels = torch.sum(
    torch.nn.functional.one_hot(predicted_class_ids[None, :].clone(), num_classes=num_labels), dim=1
).to(torch.float)
loss = model(**inputs, labels=labels).loss`,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, MBartForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>, problem_type=<span class="hljs-string">&quot;multi_label_classification&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><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_ids = torch.arange(<span class="hljs-number">0</span>, logits.shape[-<span class="hljs-number">1</span>])[torch.sigmoid(logits).squeeze(dim=<span class="hljs-number">0</span>) &gt; <span class="hljs-number">0.5</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>, num_labels=num_labels, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.<span class="hljs-built_in">sum</span>(
<span class="hljs-meta">... </span>    torch.nn.functional.one_hot(predicted_class_ids[<span class="hljs-literal">None</span>, :].clone(), num_classes=num_labels), dim=<span class="hljs-number">1</span>
<span class="hljs-meta">... </span>).to(torch.<span class="hljs-built_in">float</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){l=a("p"),b=i("Example of multi-label classification:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example of multi-label classification:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function n1(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import AutoTokenizer, MBartForCausalLM

tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-cc25")
model = MBartForCausalLM.from_pretrained("facebook/mbart-large-cc25", add_cross_attention=False)
assert model.config.is_decoder, f"{model.__class__} has to be configured as a decoder."
inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)

logits = outputs.logits
expected_shape = [1, inputs.input_ids.shape[-1], model.config.vocab_size]
list(logits.shape) == expected_shape`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MBartForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartForCausalLM.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>, add_cross_attention=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">assert</span> model.config.is_decoder, <span class="hljs-string">f&quot;<span class="hljs-subst">{model.__class__}</span> has to be configured as a decoder.&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>logits = outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span>expected_shape = [<span class="hljs-number">1</span>, inputs.input_ids.shape[-<span class="hljs-number">1</span>], model.config.vocab_size]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(logits.shape) == expected_shape
<span class="hljs-literal">True</span>`}}),{c(){l=a("p"),b=i("Example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function a1(M){let l,b,f,h,k,n,u,q,bt,ot,X,Se,he,j,vt,ee,Oe,Nt,me,re,Xe,Te,yt,we,$e,Tt,nt,Q,fe,Qe,ie,O,I,wt,_e,ge,$t,J,xt,Mt,U,Ie,xe,at,de,Me,ze,zt,le,Fe,qe,st,Z,S,He,N,Ft,Ve;return{c(){l=a("p"),b=i("TensorFlow models and layers in "),f=a("code"),h=i("transformers"),k=i(" accept two formats as input:"),n=c(),u=a("ul"),q=a("li"),bt=i("having all inputs as keyword arguments (like PyTorch models), or"),ot=c(),X=a("li"),Se=i("having all inputs as a list, tuple or dict in the first positional argument."),he=c(),j=a("p"),vt=i(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),ee=a("code"),Oe=i("model.fit()"),Nt=i(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),me=a("code"),re=i("model.fit()"),Xe=i(` supports! If, however, you want to use the second
format outside of Keras methods like `),Te=a("code"),yt=i("fit()"),we=i(" and "),$e=a("code"),Tt=i("predict()"),nt=i(`, such as when creating your own layers or models with
the Keras `),Q=a("code"),fe=i("Functional"),Qe=i(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ie=c(),O=a("ul"),I=a("li"),wt=i("a single Tensor with "),_e=a("code"),ge=i("input_ids"),$t=i(" only and nothing else: "),J=a("code"),xt=i("model(input_ids)"),Mt=c(),U=a("li"),Ie=i(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),xe=a("code"),at=i("model([input_ids, attention_mask])"),de=i(" or "),Me=a("code"),ze=i("model([input_ids, attention_mask, token_type_ids])"),zt=c(),le=a("li"),Fe=i(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),qe=a("code"),st=i('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Z=c(),S=a("p"),He=i(`Note that when creating models and layers with
`),N=a("a"),Ft=i("subclassing"),Ve=i(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(z){l=s(z,"P",{});var B=r(l);b=d(B,"TensorFlow models and layers in "),f=s(B,"CODE",{});var K=r(f);h=d(K,"transformers"),K.forEach(t),k=d(B," accept two formats as input:"),B.forEach(t),n=p(z),u=s(z,"UL",{});var Ke=r(u);q=s(Ke,"LI",{});var qt=r(q);bt=d(qt,"having all inputs as keyword arguments (like PyTorch models), or"),qt.forEach(t),ot=p(Ke),X=s(Ke,"LI",{});var Jt=r(X);Se=d(Jt,"having all inputs as a list, tuple or dict in the first positional argument."),Jt.forEach(t),Ke.forEach(t),he=p(z),j=s(z,"P",{});var C=r(j);vt=d(C,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),ee=s(C,"CODE",{});var jt=r(ee);Oe=d(jt,"model.fit()"),jt.forEach(t),Nt=d(C,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),me=s(C,"CODE",{});var Zt=r(me);re=d(Zt,"model.fit()"),Zt.forEach(t),Xe=d(C,` supports! If, however, you want to use the second
format outside of Keras methods like `),Te=s(C,"CODE",{});var Yt=r(Te);yt=d(Yt,"fit()"),Yt.forEach(t),we=d(C," and "),$e=s(C,"CODE",{});var Bt=r($e);Tt=d(Bt,"predict()"),Bt.forEach(t),nt=d(C,`, such as when creating your own layers or models with
the Keras `),Q=s(C,"CODE",{});var eo=r(Q);fe=d(eo,"Functional"),eo.forEach(t),Qe=d(C,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),C.forEach(t),ie=p(z),O=s(z,"UL",{});var ce=r(O);I=s(ce,"LI",{});var pe=r(I);wt=d(pe,"a single Tensor with "),_e=s(pe,"CODE",{});var to=r(_e);ge=d(to,"input_ids"),to.forEach(t),$t=d(pe," only and nothing else: "),J=s(pe,"CODE",{});var oo=r(J);xt=d(oo,"model(input_ids)"),oo.forEach(t),pe.forEach(t),Mt=p(ce),U=s(ce,"LI",{});var ke=r(U);Ie=d(ke,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),xe=s(ke,"CODE",{});var te=r(xe);at=d(te,"model([input_ids, attention_mask])"),te.forEach(t),de=d(ke," or "),Me=s(ke,"CODE",{});var no=r(Me);ze=d(no,"model([input_ids, attention_mask, token_type_ids])"),no.forEach(t),ke.forEach(t),zt=p(ce),le=s(ce,"LI",{});var je=r(le);Fe=d(je,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),qe=s(je,"CODE",{});var Et=r(qe);st=d(Et,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Et.forEach(t),je.forEach(t),ce.forEach(t),Z=p(z),S=s(z,"P",{});var Je=r(S);He=d(Je,`Note that when creating models and layers with
`),N=s(Je,"A",{href:!0,rel:!0});var ao=r(N);Ft=d(ao,"subclassing"),ao.forEach(t),Ve=d(Je,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),Je.forEach(t),this.h()},h(){m(N,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(N,"rel","nofollow")},m(z,B){g(z,l,B),e(l,b),e(l,f),e(f,h),e(l,k),g(z,n,B),g(z,u,B),e(u,q),e(q,bt),e(u,ot),e(u,X),e(X,Se),g(z,he,B),g(z,j,B),e(j,vt),e(j,ee),e(ee,Oe),e(j,Nt),e(j,me),e(me,re),e(j,Xe),e(j,Te),e(Te,yt),e(j,we),e(j,$e),e($e,Tt),e(j,nt),e(j,Q),e(Q,fe),e(j,Qe),g(z,ie,B),g(z,O,B),e(O,I),e(I,wt),e(I,_e),e(_e,ge),e(I,$t),e(I,J),e(J,xt),e(O,Mt),e(O,U),e(U,Ie),e(U,xe),e(xe,at),e(U,de),e(U,Me),e(Me,ze),e(O,zt),e(O,le),e(le,Fe),e(le,qe),e(qe,st),g(z,Z,B),g(z,S,B),e(S,He),e(S,N),e(N,Ft),e(S,Ve)},d(z){z&&t(l),z&&t(n),z&&t(u),z&&t(he),z&&t(j),z&&t(ie),z&&t(O),z&&t(Z),z&&t(S)}}}function s1(M){let l,b,f,h,k;return{c(){l=a("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),h=i("Module"),k=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.`)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var q=r(f);h=d(q,"Module"),q.forEach(t),k=d(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(n,u){g(n,l,u),e(l,b),e(l,f),e(f,h),e(l,k)},d(n){n&&t(l)}}}function r1(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import AutoTokenizer, TFMBartModel
import tensorflow as tf

tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-cc25")
model = TFMBartModel.from_pretrained("facebook/mbart-large-cc25")

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

last_hidden_states = outputs.last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFMBartModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFMBartModel.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){l=a("p"),b=i("Example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function i1(M){let l,b,f,h,k,n,u,q,bt,ot,X,Se,he,j,vt,ee,Oe,Nt,me,re,Xe,Te,yt,we,$e,Tt,nt,Q,fe,Qe,ie,O,I,wt,_e,ge,$t,J,xt,Mt,U,Ie,xe,at,de,Me,ze,zt,le,Fe,qe,st,Z,S,He,N,Ft,Ve;return{c(){l=a("p"),b=i("TensorFlow models and layers in "),f=a("code"),h=i("transformers"),k=i(" accept two formats as input:"),n=c(),u=a("ul"),q=a("li"),bt=i("having all inputs as keyword arguments (like PyTorch models), or"),ot=c(),X=a("li"),Se=i("having all inputs as a list, tuple or dict in the first positional argument."),he=c(),j=a("p"),vt=i(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),ee=a("code"),Oe=i("model.fit()"),Nt=i(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),me=a("code"),re=i("model.fit()"),Xe=i(` supports! If, however, you want to use the second
format outside of Keras methods like `),Te=a("code"),yt=i("fit()"),we=i(" and "),$e=a("code"),Tt=i("predict()"),nt=i(`, such as when creating your own layers or models with
the Keras `),Q=a("code"),fe=i("Functional"),Qe=i(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ie=c(),O=a("ul"),I=a("li"),wt=i("a single Tensor with "),_e=a("code"),ge=i("input_ids"),$t=i(" only and nothing else: "),J=a("code"),xt=i("model(input_ids)"),Mt=c(),U=a("li"),Ie=i(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),xe=a("code"),at=i("model([input_ids, attention_mask])"),de=i(" or "),Me=a("code"),ze=i("model([input_ids, attention_mask, token_type_ids])"),zt=c(),le=a("li"),Fe=i(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),qe=a("code"),st=i('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Z=c(),S=a("p"),He=i(`Note that when creating models and layers with
`),N=a("a"),Ft=i("subclassing"),Ve=i(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(z){l=s(z,"P",{});var B=r(l);b=d(B,"TensorFlow models and layers in "),f=s(B,"CODE",{});var K=r(f);h=d(K,"transformers"),K.forEach(t),k=d(B," accept two formats as input:"),B.forEach(t),n=p(z),u=s(z,"UL",{});var Ke=r(u);q=s(Ke,"LI",{});var qt=r(q);bt=d(qt,"having all inputs as keyword arguments (like PyTorch models), or"),qt.forEach(t),ot=p(Ke),X=s(Ke,"LI",{});var Jt=r(X);Se=d(Jt,"having all inputs as a list, tuple or dict in the first positional argument."),Jt.forEach(t),Ke.forEach(t),he=p(z),j=s(z,"P",{});var C=r(j);vt=d(C,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),ee=s(C,"CODE",{});var jt=r(ee);Oe=d(jt,"model.fit()"),jt.forEach(t),Nt=d(C,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),me=s(C,"CODE",{});var Zt=r(me);re=d(Zt,"model.fit()"),Zt.forEach(t),Xe=d(C,` supports! If, however, you want to use the second
format outside of Keras methods like `),Te=s(C,"CODE",{});var Yt=r(Te);yt=d(Yt,"fit()"),Yt.forEach(t),we=d(C," and "),$e=s(C,"CODE",{});var Bt=r($e);Tt=d(Bt,"predict()"),Bt.forEach(t),nt=d(C,`, such as when creating your own layers or models with
the Keras `),Q=s(C,"CODE",{});var eo=r(Q);fe=d(eo,"Functional"),eo.forEach(t),Qe=d(C,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),C.forEach(t),ie=p(z),O=s(z,"UL",{});var ce=r(O);I=s(ce,"LI",{});var pe=r(I);wt=d(pe,"a single Tensor with "),_e=s(pe,"CODE",{});var to=r(_e);ge=d(to,"input_ids"),to.forEach(t),$t=d(pe," only and nothing else: "),J=s(pe,"CODE",{});var oo=r(J);xt=d(oo,"model(input_ids)"),oo.forEach(t),pe.forEach(t),Mt=p(ce),U=s(ce,"LI",{});var ke=r(U);Ie=d(ke,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),xe=s(ke,"CODE",{});var te=r(xe);at=d(te,"model([input_ids, attention_mask])"),te.forEach(t),de=d(ke," or "),Me=s(ke,"CODE",{});var no=r(Me);ze=d(no,"model([input_ids, attention_mask, token_type_ids])"),no.forEach(t),ke.forEach(t),zt=p(ce),le=s(ce,"LI",{});var je=r(le);Fe=d(je,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),qe=s(je,"CODE",{});var Et=r(qe);st=d(Et,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Et.forEach(t),je.forEach(t),ce.forEach(t),Z=p(z),S=s(z,"P",{});var Je=r(S);He=d(Je,`Note that when creating models and layers with
`),N=s(Je,"A",{href:!0,rel:!0});var ao=r(N);Ft=d(ao,"subclassing"),ao.forEach(t),Ve=d(Je,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),Je.forEach(t),this.h()},h(){m(N,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(N,"rel","nofollow")},m(z,B){g(z,l,B),e(l,b),e(l,f),e(f,h),e(l,k),g(z,n,B),g(z,u,B),e(u,q),e(q,bt),e(u,ot),e(u,X),e(X,Se),g(z,he,B),g(z,j,B),e(j,vt),e(j,ee),e(ee,Oe),e(j,Nt),e(j,me),e(me,re),e(j,Xe),e(j,Te),e(Te,yt),e(j,we),e(j,$e),e($e,Tt),e(j,nt),e(j,Q),e(Q,fe),e(j,Qe),g(z,ie,B),g(z,O,B),e(O,I),e(I,wt),e(I,_e),e(_e,ge),e(I,$t),e(I,J),e(J,xt),e(O,Mt),e(O,U),e(U,Ie),e(U,xe),e(xe,at),e(U,de),e(U,Me),e(Me,ze),e(O,zt),e(O,le),e(le,Fe),e(le,qe),e(qe,st),g(z,Z,B),g(z,S,B),e(S,He),e(S,N),e(N,Ft),e(S,Ve)},d(z){z&&t(l),z&&t(n),z&&t(u),z&&t(he),z&&t(j),z&&t(ie),z&&t(O),z&&t(Z),z&&t(S)}}}function d1(M){let l,b,f,h,k;return{c(){l=a("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),h=i("Module"),k=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.`)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var q=r(f);h=d(q,"Module"),q.forEach(t),k=d(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(n,u){g(n,l,u),e(l,b),e(l,f),e(f,h),e(l,k)},d(n){n&&t(l)}}}function l1(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import AutoTokenizer, TFMBartForConditionalGeneration

model = TFMBartForConditionalGeneration.from_pretrained("facebook/mbart-large-en-ro")
tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-en-ro")

example_english_phrase = "42 is the answer"
inputs = tokenizer(example_english_phrase, return_tensors="tf")

# Translate
generated_ids = model.generate(**inputs, num_beams=4, max_length=5)
tokenizer.batch_decode(generated_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFMBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-en-ro&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-en-ro&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>example_english_phrase = <span class="hljs-string">&quot;42 is the answer&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(example_english_phrase, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Translate</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(**inputs, num_beams=<span class="hljs-number">4</span>, max_length=<span class="hljs-number">5</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>, clean_up_tokenization_spaces=<span class="hljs-literal">False</span>)[<span class="hljs-number">0</span>]
<span class="hljs-string">&#x27;42 este r\u0103spuns&#x27;</span>`}}),{c(){l=a("p"),b=i("Translation example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Translation example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function c1(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import AutoTokenizer, TFMBartForConditionalGeneration
import tensorflow as tf

model = TFMBartForConditionalGeneration.from_pretrained("facebook/mbart-large-cc25")
tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-cc25")

# de_DE is the language symbol id <LID> for German
TXT = "</s> Meine Freunde sind <mask> nett aber sie essen zu viel Kuchen. </s> de_DE"

input_ids = tokenizer([TXT], add_special_tokens=False, return_tensors="tf")["input_ids"]
logits = model(input_ids).logits

masked_index = tf.where(input_ids[0] == tokenizer.mask_token_id)[0, 0]
probs = tf.nn.softmax(logits[0, masked_index], axis=0)
values, predictions = tf.math.top_k(probs, 5)

tokenizer.decode(predictions).split()`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFMBartForConditionalGeneration
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># de_DE is the language symbol id &lt;LID&gt; for German</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>TXT = <span class="hljs-string">&quot;&lt;/s&gt; Meine Freunde sind &lt;mask&gt; nett aber sie essen zu viel Kuchen. &lt;/s&gt; de_DE&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer([TXT], add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(input_ids).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>masked_index = tf.where(input_ids[<span class="hljs-number">0</span>] == tokenizer.mask_token_id)[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = tf.nn.softmax(logits[<span class="hljs-number">0</span>, masked_index], axis=<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>values, predictions = tf.math.top_k(probs, <span class="hljs-number">5</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predictions).split()
[<span class="hljs-string">&#x27;nett&#x27;</span>, <span class="hljs-string">&#x27;sehr&#x27;</span>, <span class="hljs-string">&#x27;ganz&#x27;</span>, <span class="hljs-string">&#x27;nicht&#x27;</span>, <span class="hljs-string">&#x27;so&#x27;</span>]`}}),{c(){l=a("p"),b=i("Mask filling example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Mask filling example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function p1(M){let l,b,f,h,k;return{c(){l=a("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),h=i("Module"),k=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.`)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var q=r(f);h=d(q,"Module"),q.forEach(t),k=d(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(n,u){g(n,l,u),e(l,b),e(l,f),e(f,h),e(l,k)},d(n){n&&t(l)}}}function u1(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import AutoTokenizer, FlaxMBartModel

tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-cc25")
model = FlaxMBartModel.from_pretrained("facebook/mbart-large-cc25")

inputs = tokenizer("Hello, my dog is cute", return_tensors="jax")
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, FlaxMBartModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartModel.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&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;jax&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(){l=a("p"),b=i("Example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function h1(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import AutoTokenizer, FlaxMBartForConditionalGeneration

model = FlaxMBartForConditionalGeneration.from_pretrained("facebook/mbart-large-cc25")
tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-cc25")

text = "My friends are cool but they eat too many carbs."
inputs = tokenizer(text, max_length=1024, return_tensors="jax")
encoder_outputs = model.encode(**inputs)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;My friends are cool but they eat too many carbs.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(text, max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)`}}),{c(){l=a("p"),b=i("Example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function m1(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import AutoTokenizer, FlaxMBartForConditionalGeneration

model = FlaxMBartForConditionalGeneration.from_pretrained("facebook/mbart-large-cc25")
tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-cc25")

text = "My friends are cool but they eat too many carbs."
inputs = tokenizer(text, max_length=1024, return_tensors="jax")
encoder_outputs = model.encode(**inputs)

decoder_start_token_id = model.config.decoder_start_token_id
decoder_input_ids = jnp.ones((inputs.input_ids.shape[0], 1), dtype="i4") * decoder_start_token_id

outputs = model.decode(decoder_input_ids, encoder_outputs)
last_decoder_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, FlaxMBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;My friends are cool but they eat too many carbs.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(text, max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_start_token_id = model.config.decoder_start_token_id
<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_input_ids = jnp.ones((inputs.input_ids.shape[<span class="hljs-number">0</span>], <span class="hljs-number">1</span>), dtype=<span class="hljs-string">&quot;i4&quot;</span>) * decoder_start_token_id

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.decode(decoder_input_ids, encoder_outputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_decoder_hidden_states = outputs.last_hidden_state`}}),{c(){l=a("p"),b=i("Example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function f1(M){let l,b,f,h,k;return{c(){l=a("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),h=i("Module"),k=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.`)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var q=r(f);h=d(q,"Module"),q.forEach(t),k=d(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(n,u){g(n,l,u),e(l,b),e(l,f),e(f,h),e(l,k)},d(n){n&&t(l)}}}function _1(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import AutoTokenizer, FlaxMBartForConditionalGeneration, MBartConfig

model = FlaxMBartForConditionalGeneration.from_pretrained("facebook/mbart-large-cc25")
tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-cc25")

ARTICLE_TO_SUMMARIZE = "Meine Freunde sind cool, aber sie essen zu viel Kuchen."
inputs = tokenizer([ARTICLE_TO_SUMMARIZE], max_length=1024, return_tensors="np")

# Generate Summary
summary_ids = model.generate(inputs["input_ids"], num_beams=4, max_length=5).sequences
print(tokenizer.batch_decode(summary_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False))`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMBartForConditionalGeneration, MBartConfig

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>ARTICLE_TO_SUMMARIZE = <span class="hljs-string">&quot;Meine Freunde sind cool, aber sie essen zu viel Kuchen.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([ARTICLE_TO_SUMMARIZE], max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Generate Summary</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>summary_ids = model.generate(inputs[<span class="hljs-string">&quot;input_ids&quot;</span>], num_beams=<span class="hljs-number">4</span>, max_length=<span class="hljs-number">5</span>).sequences
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(tokenizer.batch_decode(summary_ids, skip_special_tokens=<span class="hljs-literal">True</span>, clean_up_tokenization_spaces=<span class="hljs-literal">False</span>))`}}),{c(){l=a("p"),b=i("Summarization example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Summarization example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function g1(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import AutoTokenizer, FlaxMBartForConditionalGeneration

model = FlaxMBartForConditionalGeneration.from_pretrained("facebook/mbart-large-cc25")
tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-cc25")

# de_DE is the language symbol id <LID> for German
TXT = "</s> Meine Freunde sind <mask> nett aber sie essen zu viel Kuchen. </s> de_DE"
input_ids = tokenizer([TXT], add_special_tokens=False, return_tensors="np")["input_ids"]

logits = model(input_ids).logits
masked_index = (input_ids[0] == tokenizer.mask_token_id).nonzero()[0].item()
probs = logits[0, masked_index].softmax(dim=0)
values, predictions = probs.topk(5)

tokenizer.decode(predictions).split()`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># de_DE is the language symbol id &lt;LID&gt; for German</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>TXT = <span class="hljs-string">&quot;&lt;/s&gt; Meine Freunde sind &lt;mask&gt; nett aber sie essen zu viel Kuchen. &lt;/s&gt; de_DE&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer([TXT], add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(input_ids).logits
<span class="hljs-meta">&gt;&gt;&gt; </span>masked_index = (input_ids[<span class="hljs-number">0</span>] == tokenizer.mask_token_id).nonzero()[<span class="hljs-number">0</span>].item()
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = logits[<span class="hljs-number">0</span>, masked_index].softmax(dim=<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>values, predictions = probs.topk(<span class="hljs-number">5</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predictions).split()`}}),{c(){l=a("p"),b=i("Mask filling example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Mask filling example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function k1(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import AutoTokenizer, FlaxMBartForConditionalGeneration

model = FlaxMBartForConditionalGeneration.from_pretrained("facebook/mbart-large-cc25")
tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-cc25")

text = "My friends are cool but they eat too many carbs."
inputs = tokenizer(text, max_length=1024, return_tensors="jax")
encoder_outputs = model.encode(**inputs)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;My friends are cool but they eat too many carbs.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(text, max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)`}}),{c(){l=a("p"),b=i("Example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function b1(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import AutoTokenizer, FlaxMBartForConditionalGeneration

model = FlaxMBartForConditionalGeneration.from_pretrained("facebook/mbart-large-cc25")
tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-cc25")

text = "My friends are cool but they eat too many carbs."
inputs = tokenizer(text, max_length=1024, return_tensors="jax")
encoder_outputs = model.encode(**inputs)

decoder_start_token_id = model.config.decoder_start_token_id
decoder_input_ids = jnp.ones((inputs.input_ids.shape[0], 1), dtype="i4") * decoder_start_token_id

outputs = model.decode(decoder_input_ids, encoder_outputs)
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;My friends are cool but they eat too many carbs.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(text, max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_start_token_id = model.config.decoder_start_token_id
<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_input_ids = jnp.ones((inputs.input_ids.shape[<span class="hljs-number">0</span>], <span class="hljs-number">1</span>), dtype=<span class="hljs-string">&quot;i4&quot;</span>) * decoder_start_token_id

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.decode(decoder_input_ids, encoder_outputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){l=a("p"),b=i("Example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function v1(M){let l,b,f,h,k;return{c(){l=a("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),h=i("Module"),k=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.`)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var q=r(f);h=d(q,"Module"),q.forEach(t),k=d(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(n,u){g(n,l,u),e(l,b),e(l,f),e(f,h),e(l,k)},d(n){n&&t(l)}}}function y1(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import AutoTokenizer, FlaxMBartForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-cc25")
model = FlaxMBartForSequenceClassification.from_pretrained("facebook/mbart-large-cc25")

inputs = tokenizer("Hello, my dog is cute", return_tensors="jax")

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&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;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){l=a("p"),b=i("Example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function T1(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import AutoTokenizer, FlaxMBartForConditionalGeneration

model = FlaxMBartForConditionalGeneration.from_pretrained("facebook/mbart-large-cc25")
tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-cc25")

text = "My friends are cool but they eat too many carbs."
inputs = tokenizer(text, max_length=1024, return_tensors="jax")
encoder_outputs = model.encode(**inputs)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;My friends are cool but they eat too many carbs.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(text, max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)`}}),{c(){l=a("p"),b=i("Example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function w1(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import AutoTokenizer, FlaxMBartForConditionalGeneration

model = FlaxMBartForConditionalGeneration.from_pretrained("facebook/mbart-large-cc25")
tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-cc25")

text = "My friends are cool but they eat too many carbs."
inputs = tokenizer(text, max_length=1024, return_tensors="jax")
encoder_outputs = model.encode(**inputs)

decoder_start_token_id = model.config.decoder_start_token_id
decoder_input_ids = jnp.ones((inputs.input_ids.shape[0], 1), dtype="i4") * decoder_start_token_id

outputs = model.decode(decoder_input_ids, encoder_outputs)
last_decoder_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, FlaxMBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;My friends are cool but they eat too many carbs.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(text, max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_start_token_id = model.config.decoder_start_token_id
<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_input_ids = jnp.ones((inputs.input_ids.shape[<span class="hljs-number">0</span>], <span class="hljs-number">1</span>), dtype=<span class="hljs-string">&quot;i4&quot;</span>) * decoder_start_token_id

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.decode(decoder_input_ids, encoder_outputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_decoder_hidden_states = outputs.last_hidden_state`}}),{c(){l=a("p"),b=i("Example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function $1(M){let l,b,f,h,k;return{c(){l=a("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),h=i("Module"),k=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.`)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var q=r(f);h=d(q,"Module"),q.forEach(t),k=d(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(n,u){g(n,l,u),e(l,b),e(l,f),e(f,h),e(l,k)},d(n){n&&t(l)}}}function x1(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import AutoTokenizer, FlaxMBartForQuestionAnswering

tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-cc25")
model = FlaxMBartForQuestionAnswering.from_pretrained("facebook/mbart-large-cc25")

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"
inputs = tokenizer(question, text, return_tensors="jax")

outputs = model(**inputs)
start_scores = outputs.start_logits
end_scores = outputs.end_logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMBartForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_scores = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>end_scores = outputs.end_logits`}}),{c(){l=a("p"),b=i("Example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function M1(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import AutoTokenizer, FlaxMBartForConditionalGeneration

model = FlaxMBartForConditionalGeneration.from_pretrained("facebook/mbart-large-cc25")
tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-cc25")

text = "My friends are cool but they eat too many carbs."
inputs = tokenizer(text, max_length=1024, return_tensors="jax")
encoder_outputs = model.encode(**inputs)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;My friends are cool but they eat too many carbs.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(text, max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)`}}),{c(){l=a("p"),b=i("Example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function z1(M){let l,b,f,h,k;return h=new E({props:{code:`from transformers import AutoTokenizer, FlaxMBartForConditionalGeneration

model = FlaxMBartForConditionalGeneration.from_pretrained("facebook/mbart-large-cc25")
tokenizer = AutoTokenizer.from_pretrained("facebook/mbart-large-cc25")

text = "My friends are cool but they eat too many carbs."
inputs = tokenizer(text, max_length=1024, return_tensors="jax")
encoder_outputs = model.encode(**inputs)

decoder_start_token_id = model.config.decoder_start_token_id
decoder_input_ids = jnp.ones((inputs.input_ids.shape[0], 1), dtype="i4") * decoder_start_token_id

outputs = model.decode(decoder_input_ids, encoder_outputs)
last_decoder_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, FlaxMBartForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-cc25&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;My friends are cool but they eat too many carbs.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(text, max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_start_token_id = model.config.decoder_start_token_id
<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_input_ids = jnp.ones((inputs.input_ids.shape[<span class="hljs-number">0</span>], <span class="hljs-number">1</span>), dtype=<span class="hljs-string">&quot;i4&quot;</span>) * decoder_start_token_id

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.decode(decoder_input_ids, encoder_outputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_decoder_hidden_states = outputs.last_hidden_state`}}),{c(){l=a("p"),b=i("Example:"),f=c(),v(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),y(h.$$.fragment,n)},m(n,u){g(n,l,u),e(l,b),g(n,f,u),T(h,n,u),k=!0},p:P,i(n){k||(w(h.$$.fragment,n),k=!0)},o(n){$(h.$$.fragment,n),k=!1},d(n){n&&t(l),n&&t(f),x(h,n)}}}function F1(M){let l,b,f,h,k,n,u,q,bt,ot,X,Se,he,j,vt,ee,Oe,Nt,me,re,Xe,Te,yt,we,$e,Tt,nt,Q,fe,Qe,ie,O,I,wt,_e,ge,$t,J,xt,Mt,U,Ie,xe,at,de,Me,ze,zt,le,Fe,qe,st,Z,S,He,N,Ft,Ve,z,B,K,Ke,qt,Jt,C,jt,Zt,Yt,Bt,eo,ce,pe,to,oo,ke,te,no,je,Et,Je,ao,dm,qd,lm,cm,jd,pm,um,Np,Mi,Bd,hm,Dp,Sa,Lp,zi,Oa,Ed,mm,fm,so,_m,Cd,gm,km,Ad,bm,vm,Gp,Ia,Wp,ro,Xo,Pd,Na,ym,Sd,Tm,Up,Dt,wm,Da,$m,xm,Od,Mm,zm,Rp,Fi,Fm,Xp,qi,Id,qm,Qp,io,Qo,Nd,La,jm,Dd,Bm,Hp,rt,Em,Ld,Cm,Am,Gd,Pm,Sm,Wd,Om,Im,Vp,Ho,Nm,ji,Dm,Lm,Kp,Bi,Ud,Gm,Jp,Ga,Zp,Ei,Wa,Rd,Wm,Um,Be,Rm,Xd,Xm,Qm,Qd,Hm,Vm,Hd,Km,Jm,Vd,Zm,Ym,Kd,ef,tf,Yp,Ua,eu,lo,Vo,Jd,Ra,of,Zd,nf,tu,be,Yd,Ci,af,sf,el,Ai,rf,df,tl,Pi,lf,cf,ol,Si,pf,uf,nl,Oi,hf,mf,al,Ii,ff,ou,co,Ko,sl,Xa,_f,rl,gf,nu,Ze,Qa,kf,po,bf,Ni,vf,yf,Ha,Tf,wf,$f,uo,xf,Di,Mf,zf,Li,Ff,qf,jf,Jo,au,ho,Zo,il,Va,Bf,dl,Ef,su,ue,Ka,Cf,ll,Af,Pf,Ct,Sf,Gi,Of,If,Wi,Nf,Df,Ja,Lf,Gf,Wf,mo,Uf,cl,Rf,Xf,pl,Qf,Hf,Vf,Yo,Kf,it,Za,Jf,Ya,Zf,ul,Yf,e_,t_,es,ts,hl,o_,n_,ml,a_,s_,os,fl,r_,i_,_l,d_,l_,gl,c_,ru,fo,en,kl,ns,p_,bl,u_,iu,D,as,h_,_o,m_,vl,f_,__,ss,g_,k_,b_,rs,v_,Ui,y_,T_,w_,go,$_,yl,x_,M_,Tl,z_,F_,q_,tn,j_,Ne,is,B_,wl,E_,C_,ds,A_,$l,P_,S_,O_,ls,cs,xl,I_,N_,Ml,D_,L_,ps,zl,G_,W_,Fl,U_,R_,ql,X_,Q_,on,us,H_,jl,V_,K_,nn,hs,J_,Bl,Z_,Y_,an,ms,eg,El,tg,du,ko,sn,Cl,fs,og,Al,ng,lu,L,_s,ag,gs,sg,ks,rg,ig,dg,bs,lg,Ri,cg,pg,ug,rn,hg,dt,vs,mg,ys,fg,Pl,_g,gg,kg,Ts,ws,Sl,bg,vg,Ol,yg,Tg,$s,Il,wg,$g,Nl,xg,Mg,Dl,zg,Fg,dn,xs,qg,Ll,jg,Bg,ln,Ms,Eg,zs,Cg,Gl,Ag,Pg,Sg,cn,Fs,Og,Wl,Ig,Ng,pn,qs,Dg,Ul,Lg,cu,bo,un,Rl,js,Gg,Xl,Wg,pu,Y,Bs,Ug,vo,Rg,Ql,Xg,Qg,Es,Hg,Vg,Kg,Cs,Jg,Xi,Zg,Yg,ek,hn,tk,De,As,ok,Hl,nk,ak,Ps,sk,Vl,rk,ik,dk,Ss,Os,Kl,lk,ck,Jl,pk,uk,Is,Zl,hk,mk,Yl,fk,_k,ec,gk,kk,mn,Ns,bk,tc,vk,yk,fn,Ds,Tk,oc,wk,uu,yo,_n,nc,Ls,$k,ac,xk,hu,Ye,Gs,Mk,Ws,zk,Qi,Fk,qk,jk,Us,Bk,Rs,Ek,Ck,Ak,lt,Xs,Pk,To,Sk,Hi,Ok,Ik,sc,Nk,Dk,Lk,gn,Gk,kn,mu,wo,bn,rc,Qs,Wk,ic,Uk,fu,et,Hs,Rk,Vs,Xk,Vi,Qk,Hk,Vk,Ks,Kk,Js,Jk,Zk,Yk,Le,Zs,eb,$o,tb,Ki,ob,nb,dc,ab,sb,rb,vn,ib,yn,db,Tn,_u,xo,wn,lc,Ys,lb,cc,cb,gu,Ee,er,pb,Mo,ub,pc,hb,mb,uc,fb,_b,gb,tr,kb,Ji,bb,vb,yb,or,Tb,nr,wb,$b,xb,ct,ar,Mb,zo,zb,Zi,Fb,qb,hc,jb,Bb,Eb,$n,Cb,xn,ku,Fo,Mn,mc,sr,Ab,fc,Pb,bu,Ce,rr,Sb,_c,Ob,Ib,ir,Nb,Yi,Db,Lb,Gb,dr,Wb,lr,Ub,Rb,Xb,Ge,cr,Qb,qo,Hb,ed,Vb,Kb,gc,Jb,Zb,Yb,zn,ev,Fn,tv,qn,vu,jo,jn,kc,pr,ov,bc,nv,yu,Bo,ur,av,Bn,hr,sv,En,Tu,Eo,Cn,vc,mr,rv,yc,iv,wu,Ae,fr,dv,_r,lv,td,cv,pv,uv,gr,hv,kr,mv,fv,_v,An,gv,pt,br,kv,Co,bv,od,vv,yv,Tc,Tv,wv,$v,Pn,xv,Sn,$u,Ao,On,wc,vr,Mv,$c,zv,xu,Pe,yr,Fv,Tr,qv,nd,jv,Bv,Ev,wr,Cv,$r,Av,Pv,Sv,In,Ov,We,xr,Iv,Po,Nv,ad,Dv,Lv,xc,Gv,Wv,Uv,Nn,Rv,Dn,Xv,Ln,Mu,So,Gn,Mc,Mr,Qv,zc,Hv,zu,H,zr,Vv,Fr,Kv,sd,Jv,Zv,Yv,qr,ey,jr,ty,oy,ny,Fc,ay,sy,At,qc,Br,ry,iy,jc,Er,dy,ly,Bc,Cr,cy,py,Ec,Ar,uy,hy,ut,Pr,my,Oo,fy,Cc,_y,gy,Ac,ky,by,vy,Wn,yy,Un,Ty,Rn,Sr,wy,Xn,$y,Qn,Or,xy,Hn,Fu,Io,Vn,Pc,Ir,My,Sc,zy,qu,V,Nr,Fy,Dr,qy,rd,jy,By,Ey,Lr,Cy,Gr,Ay,Py,Sy,Oc,Oy,Iy,Pt,Ic,Wr,Ny,Dy,Nc,Ur,Ly,Gy,Dc,Rr,Wy,Uy,Lc,Xr,Ry,Xy,Ue,Qr,Qy,No,Hy,Gc,Vy,Ky,Wc,Jy,Zy,Yy,Kn,eT,Jn,tT,Zn,oT,Yn,Hr,nT,ea,aT,ta,Vr,sT,oa,ju,Do,na,Uc,Kr,rT,Rc,iT,Bu,G,Jr,dT,Xc,lT,cT,Zr,pT,id,uT,hT,mT,Yr,fT,ei,_T,gT,kT,Qc,bT,vT,St,Hc,ti,yT,TT,Vc,oi,wT,$T,Kc,ni,xT,MT,Jc,ai,zT,FT,ht,si,qT,Lo,jT,Zc,BT,ET,Yc,CT,AT,PT,aa,ST,sa,OT,ra,ri,IT,ia,NT,da,ii,DT,la,Eu,Go,ca,ep,di,LT,tp,GT,Cu,W,li,WT,Wo,UT,op,RT,XT,np,QT,HT,VT,ci,KT,dd,JT,ZT,YT,pi,e2,ui,t2,o2,n2,ap,a2,s2,Ot,sp,hi,r2,i2,rp,mi,d2,l2,ip,fi,c2,p2,dp,_i,u2,h2,mt,gi,m2,Uo,f2,lp,_2,g2,cp,k2,b2,v2,pa,y2,ua,T2,ha,ki,w2,ma,$2,fa,bi,x2,_a,Au;return n=new R({}),ie=new R({}),N=new R({}),Sa=new E({props:{code:`from transformers import MBartForConditionalGeneration, MBartTokenizer

tokenizer = MBartTokenizer.from_pretrained("facebook/mbart-large-en-ro", src_lang="en_XX", tgt_lang="ro_RO")
example_english_phrase = "UN Chief Says There Is No Military Solution in Syria"
expected_translation_romanian = "\u015Eeful ONU declar\u0103 c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria"

inputs = tokenizer(example_english_phrase, text_target=expected_translation_romanian, return_tensors="pt")

model = MBartForConditionalGeneration.from_pretrained("facebook/mbart-large-en-ro")
# forward pass
model(**inputs)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MBartForConditionalGeneration, MBartTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MBartTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-en-ro&quot;</span>, src_lang=<span class="hljs-string">&quot;en_XX&quot;</span>, tgt_lang=<span class="hljs-string">&quot;ro_RO&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example_english_phrase = <span class="hljs-string">&quot;UN Chief Says There Is No Military Solution in Syria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>expected_translation_romanian = <span class="hljs-string">&quot;\u015Eeful ONU declar\u0103 c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(example_english_phrase, text_target=expected_translation_romanian, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>model = MBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-en-ro&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># forward pass</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model(**inputs)`}}),Ia=new E({props:{code:`from transformers import MBartForConditionalGeneration, MBartTokenizer

tokenizer = MBartTokenizer.from_pretrained("facebook/mbart-large-en-ro", src_lang="en_XX")
article = "UN Chief Says There Is No Military Solution in Syria"
inputs = tokenizer(article, return_tensors="pt")
translated_tokens = model.generate(**inputs, decoder_start_token_id=tokenizer.lang_code_to_id["ro_RO"])
tokenizer.batch_decode(translated_tokens, skip_special_tokens=True)[0]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MBartForConditionalGeneration, MBartTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = MBartTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-en-ro&quot;</span>, src_lang=<span class="hljs-string">&quot;en_XX&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>article = <span class="hljs-string">&quot;UN Chief Says There Is No Military Solution in Syria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(article, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>translated_tokens = model.generate(**inputs, decoder_start_token_id=tokenizer.lang_code_to_id[<span class="hljs-string">&quot;ro_RO&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(translated_tokens, skip_special_tokens=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>]
<span class="hljs-string">&quot;\u015Eeful ONU declar\u0103 c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria&quot;</span>`}}),Na=new R({}),La=new R({}),Ga=new E({props:{code:`from transformers import MBartForConditionalGeneration, MBart50TokenizerFast

model = MBartForConditionalGeneration.from_pretrained("facebook/mbart-large-50")
tokenizer = MBart50TokenizerFast.from_pretrained("facebook/mbart-large-50", src_lang="en_XX", tgt_lang="ro_RO")

src_text = " UN Chief Says There Is No Military Solution in Syria"
tgt_text = "\u015Eeful ONU declar\u0103 c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria"

model_inputs = tokenizer(src_text, text_target=tgt_text, return_tensors="pt")

model(**model_inputs)  # forward pass`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MBartForConditionalGeneration, MBart50TokenizerFast

model = MBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-50&quot;</span>)
tokenizer = MBart50TokenizerFast.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-50&quot;</span>, src_lang=<span class="hljs-string">&quot;en_XX&quot;</span>, tgt_lang=<span class="hljs-string">&quot;ro_RO&quot;</span>)

src_text = <span class="hljs-string">&quot; UN Chief Says There Is No Military Solution in Syria&quot;</span>
tgt_text = <span class="hljs-string">&quot;\u015Eeful ONU declar\u0103 c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria&quot;</span>

model_inputs = tokenizer(src_text, text_target=tgt_text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

model(**model_inputs)  <span class="hljs-comment"># forward pass</span>`}}),Ua=new E({props:{code:`from transformers import MBartForConditionalGeneration, MBart50TokenizerFast

article_hi = "\u0938\u0902\u092F\u0941\u0915\u094D\u0924 \u0930\u093E\u0937\u094D\u091F\u094D\u0930 \u0915\u0947 \u092A\u094D\u0930\u092E\u0941\u0916 \u0915\u093E \u0915\u0939\u0928\u093E \u0939\u0948 \u0915\u093F \u0938\u0940\u0930\u093F\u092F\u093E \u092E\u0947\u0902 \u0915\u094B\u0908 \u0938\u0948\u0928\u094D\u092F \u0938\u092E\u093E\u0927\u093E\u0928 \u0928\u0939\u0940\u0902 \u0939\u0948"
article_ar = "\u0627\u0644\u0623\u0645\u064A\u0646 \u0627\u0644\u0639\u0627\u0645 \u0644\u0644\u0623\u0645\u0645 \u0627\u0644\u0645\u062A\u062D\u062F\u0629 \u064A\u0642\u0648\u0644 \u0625\u0646\u0647 \u0644\u0627 \u064A\u0648\u062C\u062F \u062D\u0644 \u0639\u0633\u0643\u0631\u064A \u0641\u064A \u0633\u0648\u0631\u064A\u0627."

model = MBartForConditionalGeneration.from_pretrained("facebook/mbart-large-50-many-to-many-mmt")
tokenizer = MBart50TokenizerFast.from_pretrained("facebook/mbart-large-50-many-to-many-mmt")

# translate Hindi to French
tokenizer.src_lang = "hi_IN"
encoded_hi = tokenizer(article_hi, return_tensors="pt")
generated_tokens = model.generate(**encoded_hi, forced_bos_token_id=tokenizer.lang_code_to_id["fr_XX"])
tokenizer.batch_decode(generated_tokens, skip_special_tokens=True)
# => "Le chef de l 'ONU affirme qu 'il n 'y a pas de solution militaire en Syria."

# translate Arabic to English
tokenizer.src_lang = "ar_AR"
encoded_ar = tokenizer(article_ar, return_tensors="pt")
generated_tokens = model.generate(**encoded_ar, forced_bos_token_id=tokenizer.lang_code_to_id["en_XX"])
tokenizer.batch_decode(generated_tokens, skip_special_tokens=True)
# => "The Secretary-General of the United Nations says there is no military solution in Syria."`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MBartForConditionalGeneration, MBart50TokenizerFast

article_hi = <span class="hljs-string">&quot;\u0938\u0902\u092F\u0941\u0915\u094D\u0924 \u0930\u093E\u0937\u094D\u091F\u094D\u0930 \u0915\u0947 \u092A\u094D\u0930\u092E\u0941\u0916 \u0915\u093E \u0915\u0939\u0928\u093E \u0939\u0948 \u0915\u093F \u0938\u0940\u0930\u093F\u092F\u093E \u092E\u0947\u0902 \u0915\u094B\u0908 \u0938\u0948\u0928\u094D\u092F \u0938\u092E\u093E\u0927\u093E\u0928 \u0928\u0939\u0940\u0902 \u0939\u0948&quot;</span>
article_ar = <span class="hljs-string">&quot;\u0627\u0644\u0623\u0645\u064A\u0646 \u0627\u0644\u0639\u0627\u0645 \u0644\u0644\u0623\u0645\u0645 \u0627\u0644\u0645\u062A\u062D\u062F\u0629 \u064A\u0642\u0648\u0644 \u0625\u0646\u0647 \u0644\u0627 \u064A\u0648\u062C\u062F \u062D\u0644 \u0639\u0633\u0643\u0631\u064A \u0641\u064A \u0633\u0648\u0631\u064A\u0627.&quot;</span>

model = MBartForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-50-many-to-many-mmt&quot;</span>)
tokenizer = MBart50TokenizerFast.from_pretrained(<span class="hljs-string">&quot;facebook/mbart-large-50-many-to-many-mmt&quot;</span>)

<span class="hljs-comment"># translate Hindi to French</span>
tokenizer.src_lang = <span class="hljs-string">&quot;hi_IN&quot;</span>
encoded_hi = tokenizer(article_hi, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
generated_tokens = model.generate(**encoded_hi, forced_bos_token_id=tokenizer.lang_code_to_id[<span class="hljs-string">&quot;fr_XX&quot;</span>])
tokenizer.batch_decode(generated_tokens, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-comment"># =&gt; &quot;Le chef de l &#x27;ONU affirme qu &#x27;il n &#x27;y a pas de solution militaire en Syria.&quot;</span>

<span class="hljs-comment"># translate Arabic to English</span>
tokenizer.src_lang = <span class="hljs-string">&quot;ar_AR&quot;</span>
encoded_ar = tokenizer(article_ar, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
generated_tokens = model.generate(**encoded_ar, forced_bos_token_id=tokenizer.lang_code_to_id[<span class="hljs-string">&quot;en_XX&quot;</span>])
tokenizer.batch_decode(generated_tokens, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-comment"># =&gt; &quot;The Secretary-General of the United Nations says there is no military solution in Syria.&quot;</span>`}}),Ra=new R({}),Xa=new R({}),Qa=new F({props:{name:"class transformers.MBartConfig",anchor:"transformers.MBartConfig",parameters:[{name:"vocab_size",val:" = 50265"},{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:"use_cache",val:" = True"},{name:"is_encoder_decoder",val:" = True"},{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:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"forced_eos_token_id",val:" = 2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MBartConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50265) &#x2014;
Vocabulary size of the MBART model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartModel">MBartModel</a> or <a href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.TFMBartModel">TFMBartModel</a>.`,name:"vocab_size"},{anchor:"transformers.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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.MBartConfig.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"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/configuration_mbart.py#L34"}}),Jo=new A({props:{anchor:"transformers.MBartConfig.example",$$slots:{default:[Gx]},$$scope:{ctx:M}}}),Va=new R({}),Ka=new F({props:{name:"class transformers.MBartTokenizer",anchor:"transformers.MBartTokenizer",parameters:[{name:"vocab_file",val:""},{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:"tokenizer_file",val:" = None"},{name:"src_lang",val:" = None"},{name:"tgt_lang",val:" = None"},{name:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"additional_special_tokens",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/tokenization_mbart.py#L53"}}),Yo=new A({props:{anchor:"transformers.MBartTokenizer.example",$$slots:{default:[Wx]},$$scope:{ctx:M}}}),Za=new F({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.MBartTokenizer.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.MBartTokenizer.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.MBartTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/tokenization_mbart.py#L217",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>
`}}),ns=new R({}),as=new F({props:{name:"class transformers.MBartTokenizerFast",anchor:"transformers.MBartTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"src_lang",val:" = None"},{name:"tgt_lang",val:" = None"},{name:"additional_special_tokens",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/tokenization_mbart_fast.py#L63"}}),tn=new A({props:{anchor:"transformers.MBartTokenizerFast.example",$$slots:{default:[Ux]},$$scope:{ctx:M}}}),is=new F({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.MBartTokenizerFast.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.MBartTokenizerFast.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.MBartTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/tokenization_mbart_fast.py#L161",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>
`}}),us=new F({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.MBartTokenizerFast.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.MBartTokenizerFast.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.MBartTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/tokenization_mbart_fast.py#L190",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),hs=new F({props:{name:"set_src_lang_special_tokens",anchor:"transformers.MBartTokenizerFast.set_src_lang_special_tokens",parameters:[{name:"src_lang",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/tokenization_mbart_fast.py#L245"}}),ms=new F({props:{name:"set_tgt_lang_special_tokens",anchor:"transformers.MBartTokenizerFast.set_tgt_lang_special_tokens",parameters:[{name:"lang",val:": str"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/tokenization_mbart_fast.py#L260"}}),fs=new R({}),_s=new F({props:{name:"class transformers.MBart50Tokenizer",anchor:"transformers.MBart50Tokenizer",parameters:[{name:"vocab_file",val:""},{name:"src_lang",val:" = None"},{name:"tgt_lang",val:" = None"},{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:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MBart50Tokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.MBart50Tokenizer.src_lang",description:`<strong>src_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A string representing the source language.`,name:"src_lang"},{anchor:"transformers.MBart50Tokenizer.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A string representing the target language.`,name:"tgt_lang"},{anchor:"transformers.MBart50Tokenizer.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.`,name:"eos_token"},{anchor:"transformers.MBart50Tokenizer.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.MBart50Tokenizer.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.MBart50Tokenizer.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.MBart50Tokenizer.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.MBart50Tokenizer.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.MBart50Tokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>`,name:"sp_model_kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart50/tokenization_mbart50.py#L49"}}),rn=new A({props:{anchor:"transformers.MBart50Tokenizer.example",$$slots:{default:[Rx]},$$scope:{ctx:M}}}),vs=new F({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.MBart50Tokenizer.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.MBart50Tokenizer.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.MBart50Tokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart50/tokenization_mbart50.py#L301",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>
`}}),xs=new F({props:{name:"convert_tokens_to_string",anchor:"transformers.MBart50Tokenizer.convert_tokens_to_string",parameters:[{name:"tokens",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart50/tokenization_mbart50.py#L235"}}),Ms=new F({props:{name:"get_special_tokens_mask",anchor:"transformers.MBart50Tokenizer.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.MBart50Tokenizer.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.MBart50Tokenizer.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.MBart50Tokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart50/tokenization_mbart50.py#L271",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>
`}}),Fs=new F({props:{name:"set_src_lang_special_tokens",anchor:"transformers.MBart50Tokenizer.set_src_lang_special_tokens",parameters:[{name:"src_lang",val:": str"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart50/tokenization_mbart50.py#L358"}}),qs=new F({props:{name:"set_tgt_lang_special_tokens",anchor:"transformers.MBart50Tokenizer.set_tgt_lang_special_tokens",parameters:[{name:"tgt_lang",val:": str"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart50/tokenization_mbart50.py#L364"}}),js=new R({}),Bs=new F({props:{name:"class transformers.MBart50TokenizerFast",anchor:"transformers.MBart50TokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"src_lang",val:" = None"},{name:"tgt_lang",val:" = None"},{name:"tokenizer_file",val:" = None"},{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:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MBart50TokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.MBart50TokenizerFast.src_lang",description:`<strong>src_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A string representing the source language.`,name:"src_lang"},{anchor:"transformers.MBart50TokenizerFast.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A string representing the target language.`,name:"tgt_lang"},{anchor:"transformers.MBart50TokenizerFast.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.`,name:"eos_token"},{anchor:"transformers.MBart50TokenizerFast.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.MBart50TokenizerFast.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.MBart50TokenizerFast.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.MBart50TokenizerFast.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.MBart50TokenizerFast.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"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart50/tokenization_mbart50_fast.py#L59"}}),hn=new A({props:{anchor:"transformers.MBart50TokenizerFast.example",$$slots:{default:[Xx]},$$scope:{ctx:M}}}),As=new F({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.MBart50TokenizerFast.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.MBart50TokenizerFast.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.MBart50TokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart50/tokenization_mbart50_fast.py#L170",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>
`}}),Ns=new F({props:{name:"set_src_lang_special_tokens",anchor:"transformers.MBart50TokenizerFast.set_src_lang_special_tokens",parameters:[{name:"src_lang",val:": str"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart50/tokenization_mbart50_fast.py#L217"}}),Ds=new F({props:{name:"set_tgt_lang_special_tokens",anchor:"transformers.MBart50TokenizerFast.set_tgt_lang_special_tokens",parameters:[{name:"tgt_lang",val:": str"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart50/tokenization_mbart50_fast.py#L232"}}),Ls=new R({}),Gs=new F({props:{name:"class transformers.MBartModel",anchor:"transformers.MBartModel",parameters:[{name:"config",val:": MBartConfig"}],parametersDescription:[{anchor:"transformers.MBartModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartConfig">MBartConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_mbart.py#L1153"}}),Xs=new F({props:{name:"forward",anchor:"transformers.MBartModel.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.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[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.MBartModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MBartModel.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.MBartModel.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>MBart uses a specific language id token as the starting token for <code>decoder_input_ids</code> generation that
varies according to source and target language, <em>e.g.</em> 25004 for <em>en_XX</em>, and 25003 for <em>de_DE</em>. 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.MBartModel.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.`,name:"decoder_attention_mask"},{anchor:"transformers.MBartModel.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.MBartModel.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.MBartModel.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.MBartModel.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.MBartModel.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.MBartModel.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.MBartModel.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.MBartModel.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.MBartModel.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.MBartModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_mbart.py#L1182",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),gn=new kt({props:{$$slots:{default:[Qx]},$$scope:{ctx:M}}}),kn=new A({props:{anchor:"transformers.MBartModel.forward.example",$$slots:{default:[Hx]},$$scope:{ctx:M}}}),Qs=new R({}),Hs=new F({props:{name:"class transformers.MBartForConditionalGeneration",anchor:"transformers.MBartForConditionalGeneration",parameters:[{name:"config",val:": MBartConfig"}],parametersDescription:[{anchor:"transformers.MBartForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartConfig">MBartConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_mbart.py#L1272"}}),Zs=new F({props:{name:"forward",anchor:"transformers.MBartForConditionalGeneration.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.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[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.MBartForConditionalGeneration.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MBartForConditionalGeneration.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.MBartForConditionalGeneration.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>MBart uses a specific language id token as the starting token for <code>decoder_input_ids</code> generation that
varies according to source and target language, <em>e.g.</em> 25004 for <em>en_XX</em>, and 25003 for <em>de_DE</em>. 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.MBartForConditionalGeneration.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.`,name:"decoder_attention_mask"},{anchor:"transformers.MBartForConditionalGeneration.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.MBartForConditionalGeneration.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.MBartForConditionalGeneration.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.MBartForConditionalGeneration.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.MBartForConditionalGeneration.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.MBartForConditionalGeneration.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.MBartForConditionalGeneration.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.MBartForConditionalGeneration.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.MBartForConditionalGeneration.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.MBartForConditionalGeneration.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MBartForConditionalGeneration.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_mbart.py#L1318",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),vn=new kt({props:{$$slots:{default:[Vx]},$$scope:{ctx:M}}}),yn=new A({props:{anchor:"transformers.MBartForConditionalGeneration.forward.example",$$slots:{default:[Kx]},$$scope:{ctx:M}}}),Tn=new A({props:{anchor:"transformers.MBartForConditionalGeneration.forward.example-2",$$slots:{default:[Jx]},$$scope:{ctx:M}}}),Ys=new R({}),er=new F({props:{name:"class transformers.MBartForQuestionAnswering",anchor:"transformers.MBartForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.MBartForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartConfig">MBartConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_mbart.py#L1576"}}),ar=new F({props:{name:"forward",anchor:"transformers.MBartForQuestionAnswering.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.MBartForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MBartForQuestionAnswering.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.MBartForQuestionAnswering.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>MBart uses a specific language id token as the starting token for <code>decoder_input_ids</code> generation that
varies according to source and target language, <em>e.g.</em> 25004 for <em>en_XX</em>, and 25003 for <em>de_DE</em>. 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.MBartForQuestionAnswering.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.`,name:"decoder_attention_mask"},{anchor:"transformers.MBartForQuestionAnswering.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.MBartForQuestionAnswering.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.MBartForQuestionAnswering.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.MBartForQuestionAnswering.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.MBartForQuestionAnswering.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.MBartForQuestionAnswering.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.MBartForQuestionAnswering.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.MBartForQuestionAnswering.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.MBartForQuestionAnswering.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.MBartForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MBartForQuestionAnswering.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.MBartForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<em>sequence_length</em>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_mbart.py#L1591",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqQuestionAnsweringModelOutput"
>transformers.modeling_outputs.Seq2SeqQuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqQuestionAnsweringModelOutput"
>transformers.modeling_outputs.Seq2SeqQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$n=new kt({props:{$$slots:{default:[Zx]},$$scope:{ctx:M}}}),xn=new A({props:{anchor:"transformers.MBartForQuestionAnswering.forward.example",$$slots:{default:[Yx]},$$scope:{ctx:M}}}),sr=new R({}),rr=new F({props:{name:"class transformers.MBartForSequenceClassification",anchor:"transformers.MBartForSequenceClassification",parameters:[{name:"config",val:": MBartConfig"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MBartForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartConfig">MBartConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_mbart.py#L1447"}}),cr=new F({props:{name:"forward",anchor:"transformers.MBartForSequenceClassification.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.MBartForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MBartForSequenceClassification.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.MBartForSequenceClassification.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>MBart uses a specific language id token as the starting token for <code>decoder_input_ids</code> generation that
varies according to source and target language, <em>e.g.</em> 25004 for <em>en_XX</em>, and 25003 for <em>de_DE</em>. 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.MBartForSequenceClassification.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.`,name:"decoder_attention_mask"},{anchor:"transformers.MBartForSequenceClassification.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.MBartForSequenceClassification.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.MBartForSequenceClassification.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.MBartForSequenceClassification.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.MBartForSequenceClassification.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.MBartForSequenceClassification.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.MBartForSequenceClassification.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.MBartForSequenceClassification.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.MBartForSequenceClassification.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.MBartForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MBartForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_mbart.py#L1463",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqSequenceClassifierOutput"
>transformers.modeling_outputs.Seq2SeqSequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</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>label</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqSequenceClassifierOutput"
>transformers.modeling_outputs.Seq2SeqSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),zn=new kt({props:{$$slots:{default:[e1]},$$scope:{ctx:M}}}),Fn=new A({props:{anchor:"transformers.MBartForSequenceClassification.forward.example",$$slots:{default:[t1]},$$scope:{ctx:M}}}),qn=new A({props:{anchor:"transformers.MBartForSequenceClassification.forward.example-2",$$slots:{default:[o1]},$$scope:{ctx:M}}}),pr=new R({}),ur=new F({props:{name:"class transformers.MBartForCausalLM",anchor:"transformers.MBartForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_mbart.py#L1709"}}),hr=new F({props:{name:"forward",anchor:"transformers.MBartForCausalLM.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.MBartForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you
provide it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MBartForCausalLM.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.MBartForCausalLM.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.MBartForCausalLM.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.MBartForCausalLM.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.MBartForCausalLM.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.MBartForCausalLM.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.MBartForCausalLM.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.MBartForCausalLM.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.MBartForCausalLM.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.MBartForCausalLM.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.MBartForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_mbart.py#L1742",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),En=new A({props:{anchor:"transformers.MBartForCausalLM.forward.example",$$slots:{default:[n1]},$$scope:{ctx:M}}}),mr=new R({}),fr=new F({props:{name:"class transformers.TFMBartModel",anchor:"transformers.TFMBartModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMBartModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartConfig">MBartConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_tf_mbart.py#L1207"}}),An=new kt({props:{$$slots:{default:[a1]},$$scope:{ctx:M}}}),br=new F({props:{name:"call",anchor:"transformers.TFMBartModel.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor] = None"},{name:"attention_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_position_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"encoder_outputs",val:": typing.Union[typing.Tuple, transformers.modeling_tf_outputs.TFBaseModelOutput, NoneType] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[tensorflow.python.framework.ops.Tensor]]] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = 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"},{name:"training",val:": typing.Optional[bool] = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMBartModel.call.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFMBartModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFMBartModel.call.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>MBart uses a specific language id token as the starting token for <code>decoder_input_ids</code> generation that
varies according to source and target language, <em>e.g.</em> 25004 for <em>en_XX</em>, and 25003 for <em>de_DE</em>. 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.TFMBartModel.call.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
will be made by default and ignore pad tokens. It is not recommended to set this for most use cases.`,name:"decoder_attention_mask"},{anchor:"transformers.TFMBartModel.call.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.TFMBartModel.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.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.TFMBartModel.call.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>tf.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.TFMBartModel.call.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>tf.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.TFMBartModel.call.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tf.FloatTensor</code>, <em>optional</em>) &#x2014;
hidden states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.
of shape <code>(batch_size, sequence_length, hidden_size)</code> is a sequence of`,name:"encoder_outputs"},{anchor:"transformers.TFMBartModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
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.TFMBartModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#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>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"},{anchor:"transformers.TFMBartModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFMBartModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFMBartModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFMBartModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_tf_mbart.py#L1219",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the 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>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) of the decoder 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(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights 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(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights 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>tf.Tensor</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(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Pn=new kt({props:{$$slots:{default:[s1]},$$scope:{ctx:M}}}),Sn=new A({props:{anchor:"transformers.TFMBartModel.call.example",$$slots:{default:[r1]},$$scope:{ctx:M}}}),vr=new R({}),yr=new F({props:{name:"class transformers.TFMBartForConditionalGeneration",anchor:"transformers.TFMBartForConditionalGeneration",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMBartForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartConfig">MBartConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_tf_mbart.py#L1312"}}),In=new kt({props:{$$slots:{default:[i1]},$$scope:{ctx:M}}}),xr=new F({props:{name:"call",anchor:"transformers.TFMBartForConditionalGeneration.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor] = None"},{name:"attention_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_position_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[transformers.modeling_tf_outputs.TFBaseModelOutput] = None"},{name:"past_key_values",val:": typing.Tuple[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = 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"},{name:"labels",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFMBartForConditionalGeneration.call.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> of shape <code>({0})</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFMBartForConditionalGeneration.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>({0})</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.TFMBartForConditionalGeneration.call.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>MBart uses a specific language id token as the starting token for <code>decoder_input_ids</code> generation that
varies according to source and target language, <em>e.g.</em> 25004 for <em>en_XX</em>, and 25003 for <em>de_DE</em>. 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.TFMBartForConditionalGeneration.call.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
will be made by default and ignore pad tokens. It is not recommended to set this for most use cases.`,name:"decoder_attention_mask"},{anchor:"transformers.TFMBartForConditionalGeneration.call.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.TFMBartForConditionalGeneration.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.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.TFMBartForConditionalGeneration.call.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>tf.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.TFMBartForConditionalGeneration.call.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>tf.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.TFMBartForConditionalGeneration.call.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tf.FloatTensor</code>, <em>optional</em>) &#x2014;
hidden states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.
of shape <code>(batch_size, sequence_length, hidden_size)</code> is a sequence of`,name:"encoder_outputs"},{anchor:"transformers.TFMBartForConditionalGeneration.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
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.TFMBartForConditionalGeneration.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#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>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"},{anchor:"transformers.TFMBartForConditionalGeneration.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFMBartForConditionalGeneration.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFMBartForConditionalGeneration.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFMBartForConditionalGeneration.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFMBartForConditionalGeneration.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_tf_mbart.py#L1350",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Language modeling loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) of the decoder 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(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights 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(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights 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>tf.Tensor</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(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Nn=new kt({props:{$$slots:{default:[d1]},$$scope:{ctx:M}}}),Dn=new A({props:{anchor:"transformers.TFMBartForConditionalGeneration.call.example",$$slots:{default:[l1]},$$scope:{ctx:M}}}),Ln=new A({props:{anchor:"transformers.TFMBartForConditionalGeneration.call.example-2",$$slots:{default:[c1]},$$scope:{ctx:M}}}),Mr=new R({}),zr=new F({props:{name:"class transformers.FlaxMBartModel",anchor:"transformers.FlaxMBartModel",parameters:[{name:"config",val:": MBartConfig"},{name:"input_shape",val:": typing.Tuple[int] = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxMBartModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartConfig">MBartConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxMBartModel.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1277"}}),Pr=new F({props:{name:"__call__",anchor:"transformers.FlaxMBartModel.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_input_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxMBartModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>jnp.ndarray</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.FlaxMBartModel.__call__.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>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.FlaxMBartModel.__call__.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>jnp.ndarray</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 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.FlaxMBartModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxMBartModel.__call__.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxMBartModel.__call__.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxMBartModel.__call__.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxMBartModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1214",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</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(jnp.ndarray))</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(jnp.ndarray)</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(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Wn=new kt({props:{$$slots:{default:[p1]},$$scope:{ctx:M}}}),Un=new A({props:{anchor:"transformers.FlaxMBartModel.__call__.example",$$slots:{default:[u1]},$$scope:{ctx:M}}}),Sr=new F({props:{name:"encode",anchor:"transformers.FlaxMBartModel.encode",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxMBartModel.encode.input_ids",description:`<strong>input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartModel.encode.attention_mask",description:`<strong>attention_mask</strong> (<code>jnp.ndarray</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.FlaxMBartModel.encode.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxMBartModel.encode.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.FlaxMBartModel.encode.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.FlaxMBartModel.encode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1038",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</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 (<code>&lt;class 'transformers.models.mbart.configuration_mbart.MBartConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Xn=new A({props:{anchor:"transformers.FlaxMBartModel.encode.example",$$slots:{default:[h1]},$$scope:{ctx:M}}}),Or=new F({props:{name:"decode",anchor:"transformers.FlaxMBartModel.decode",parameters:[{name:"decoder_input_ids",val:""},{name:"encoder_outputs",val:""},{name:"encoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"past_key_values",val:": dict = 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"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxMBartModel.decode.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>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.FlaxMBartModel.decode.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(jnp.ndarray)</code>) &#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.FlaxMBartModel.decode.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>jnp.ndarray</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:"encoder_attention_mask"},{anchor:"transformers.FlaxMBartModel.decode.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>jnp.ndarray</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 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.FlaxMBartModel.decode.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxMBartModel.decode.past_key_values",description:`<strong>past_key_values</strong> (<code>Dict[str, np.ndarray]</code>, <em>optional</em>, returned by <code>init_cache</code> or when passing previous <code>past_key_values</code>) &#x2014;
Dictionary of pre-computed hidden-states (key and values in the attention blocks) that can be used for fast
auto-regressive decoding. Pre-computed key and value hidden-states are of shape <em>[batch_size, max_length]</em>.`,name:"past_key_values"},{anchor:"transformers.FlaxMBartModel.decode.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.FlaxMBartModel.decode.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.FlaxMBartModel.decode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1101",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</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 (<code>&lt;class 'transformers.models.mbart.configuration_mbart.MBartConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
<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(jnp.ndarray))</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(jnp.ndarray)</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 optionally if
<code>config.is_encoder_decoder=True</code> 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 optionally if
<code>config.is_encoder_decoder=True</code> 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>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</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>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Hn=new A({props:{anchor:"transformers.FlaxMBartModel.decode.example",$$slots:{default:[m1]},$$scope:{ctx:M}}}),Ir=new R({}),Nr=new F({props:{name:"class transformers.FlaxMBartForConditionalGeneration",anchor:"transformers.FlaxMBartForConditionalGeneration",parameters:[{name:"config",val:": MBartConfig"},{name:"input_shape",val:": typing.Tuple[int] = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxMBartForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartConfig">MBartConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxMBartForConditionalGeneration.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1362"}}),Qr=new F({props:{name:"__call__",anchor:"transformers.FlaxMBartForConditionalGeneration.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_input_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.input_ids",description:`<strong>input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>jnp.ndarray</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.FlaxMBartForConditionalGeneration.__call__.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>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.FlaxMBartForConditionalGeneration.__call__.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>jnp.ndarray</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 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.FlaxMBartForConditionalGeneration.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1214",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray))</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(jnp.ndarray)</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(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Kn=new kt({props:{$$slots:{default:[f1]},$$scope:{ctx:M}}}),Jn=new A({props:{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.example",$$slots:{default:[_1]},$$scope:{ctx:M}}}),Zn=new A({props:{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.example-2",$$slots:{default:[g1]},$$scope:{ctx:M}}}),Hr=new F({props:{name:"encode",anchor:"transformers.FlaxMBartForConditionalGeneration.encode",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxMBartForConditionalGeneration.encode.input_ids",description:`<strong>input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartForConditionalGeneration.encode.attention_mask",description:`<strong>attention_mask</strong> (<code>jnp.ndarray</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.FlaxMBartForConditionalGeneration.encode.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxMBartForConditionalGeneration.encode.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.FlaxMBartForConditionalGeneration.encode.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.FlaxMBartForConditionalGeneration.encode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1038",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</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 (<code>&lt;class 'transformers.models.mbart.configuration_mbart.MBartConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ea=new A({props:{anchor:"transformers.FlaxMBartForConditionalGeneration.encode.example",$$slots:{default:[k1]},$$scope:{ctx:M}}}),Vr=new F({props:{name:"decode",anchor:"transformers.FlaxMBartForConditionalGeneration.decode",parameters:[{name:"decoder_input_ids",val:""},{name:"encoder_outputs",val:""},{name:"encoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"past_key_values",val:": dict = 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"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxMBartForConditionalGeneration.decode.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>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.FlaxMBartForConditionalGeneration.decode.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(jnp.ndarray)</code>) &#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.FlaxMBartForConditionalGeneration.decode.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>jnp.ndarray</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:"encoder_attention_mask"},{anchor:"transformers.FlaxMBartForConditionalGeneration.decode.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>jnp.ndarray</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 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.FlaxMBartForConditionalGeneration.decode.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxMBartForConditionalGeneration.decode.past_key_values",description:`<strong>past_key_values</strong> (<code>Dict[str, np.ndarray]</code>, <em>optional</em>, returned by <code>init_cache</code> or when passing previous <code>past_key_values</code>) &#x2014;
Dictionary of pre-computed hidden-states (key and values in the attention blocks) that can be used for fast
auto-regressive decoding. Pre-computed key and value hidden-states are of shape <em>[batch_size, max_length]</em>.`,name:"past_key_values"},{anchor:"transformers.FlaxMBartForConditionalGeneration.decode.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.FlaxMBartForConditionalGeneration.decode.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.FlaxMBartForConditionalGeneration.decode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1366",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</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 (<code>&lt;class 'transformers.models.mbart.configuration_mbart.MBartConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray))</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>jnp.ndarray</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key, value
states of the self-attention and the cross-attention layers if model is used in encoder-decoder setting.
Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),oa=new A({props:{anchor:"transformers.FlaxMBartForConditionalGeneration.decode.example",$$slots:{default:[b1]},$$scope:{ctx:M}}}),Kr=new R({}),Jr=new F({props:{name:"class transformers.FlaxMBartForSequenceClassification",anchor:"transformers.FlaxMBartForSequenceClassification",parameters:[{name:"config",val:": MBartConfig"},{name:"input_shape",val:": typing.Tuple[int] = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxMBartForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartConfig">MBartConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxMBartForSequenceClassification.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1675"}}),si=new F({props:{name:"__call__",anchor:"transformers.FlaxMBartForSequenceClassification.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_input_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxMBartForSequenceClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartForSequenceClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>jnp.ndarray</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.FlaxMBartForSequenceClassification.__call__.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>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.FlaxMBartForSequenceClassification.__call__.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>jnp.ndarray</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 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.FlaxMBartForSequenceClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxMBartForSequenceClassification.__call__.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxMBartForSequenceClassification.__call__.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxMBartForSequenceClassification.__call__.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxMBartForSequenceClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1214",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqSequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(jnp.ndarray))</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(jnp.ndarray)</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(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),aa=new kt({props:{$$slots:{default:[v1]},$$scope:{ctx:M}}}),sa=new A({props:{anchor:"transformers.FlaxMBartForSequenceClassification.__call__.example",$$slots:{default:[y1]},$$scope:{ctx:M}}}),ri=new F({props:{name:"encode",anchor:"transformers.FlaxMBartForSequenceClassification.encode",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxMBartForSequenceClassification.encode.input_ids",description:`<strong>input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartForSequenceClassification.encode.attention_mask",description:`<strong>attention_mask</strong> (<code>jnp.ndarray</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.FlaxMBartForSequenceClassification.encode.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxMBartForSequenceClassification.encode.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.FlaxMBartForSequenceClassification.encode.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.FlaxMBartForSequenceClassification.encode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1038",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</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 (<code>&lt;class 'transformers.models.mbart.configuration_mbart.MBartConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ia=new A({props:{anchor:"transformers.FlaxMBartForSequenceClassification.encode.example",$$slots:{default:[T1]},$$scope:{ctx:M}}}),ii=new F({props:{name:"decode",anchor:"transformers.FlaxMBartForSequenceClassification.decode",parameters:[{name:"decoder_input_ids",val:""},{name:"encoder_outputs",val:""},{name:"encoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"past_key_values",val:": dict = 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"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxMBartForSequenceClassification.decode.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>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.FlaxMBartForSequenceClassification.decode.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(jnp.ndarray)</code>) &#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.FlaxMBartForSequenceClassification.decode.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>jnp.ndarray</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:"encoder_attention_mask"},{anchor:"transformers.FlaxMBartForSequenceClassification.decode.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>jnp.ndarray</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 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.FlaxMBartForSequenceClassification.decode.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxMBartForSequenceClassification.decode.past_key_values",description:`<strong>past_key_values</strong> (<code>Dict[str, np.ndarray]</code>, <em>optional</em>, returned by <code>init_cache</code> or when passing previous <code>past_key_values</code>) &#x2014;
Dictionary of pre-computed hidden-states (key and values in the attention blocks) that can be used for fast
auto-regressive decoding. Pre-computed key and value hidden-states are of shape <em>[batch_size, max_length]</em>.`,name:"past_key_values"},{anchor:"transformers.FlaxMBartForSequenceClassification.decode.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.FlaxMBartForSequenceClassification.decode.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.FlaxMBartForSequenceClassification.decode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1101",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</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 (<code>&lt;class 'transformers.models.mbart.configuration_mbart.MBartConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
<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(jnp.ndarray))</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(jnp.ndarray)</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 optionally if
<code>config.is_encoder_decoder=True</code> 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 optionally if
<code>config.is_encoder_decoder=True</code> 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>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</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>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),la=new A({props:{anchor:"transformers.FlaxMBartForSequenceClassification.decode.example",$$slots:{default:[w1]},$$scope:{ctx:M}}}),di=new R({}),li=new F({props:{name:"class transformers.FlaxMBartForQuestionAnswering",anchor:"transformers.FlaxMBartForQuestionAnswering",parameters:[{name:"config",val:": MBartConfig"},{name:"input_shape",val:": typing.Tuple[int] = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxMBartForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartConfig">MBartConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxMBartForQuestionAnswering.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1762"}}),gi=new F({props:{name:"__call__",anchor:"transformers.FlaxMBartForQuestionAnswering.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_input_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxMBartForQuestionAnswering.__call__.input_ids",description:`<strong>input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartForQuestionAnswering.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>jnp.ndarray</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.FlaxMBartForQuestionAnswering.__call__.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>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.FlaxMBartForQuestionAnswering.__call__.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>jnp.ndarray</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 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.FlaxMBartForQuestionAnswering.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxMBartForQuestionAnswering.__call__.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxMBartForQuestionAnswering.__call__.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxMBartForQuestionAnswering.__call__.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxMBartForQuestionAnswering.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1214",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqQuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartConfig"
>MBartConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>start_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(jnp.ndarray))</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(jnp.ndarray)</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(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),pa=new kt({props:{$$slots:{default:[$1]},$$scope:{ctx:M}}}),ua=new A({props:{anchor:"transformers.FlaxMBartForQuestionAnswering.__call__.example",$$slots:{default:[x1]},$$scope:{ctx:M}}}),ki=new F({props:{name:"encode",anchor:"transformers.FlaxMBartForQuestionAnswering.encode",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxMBartForQuestionAnswering.encode.input_ids",description:`<strong>input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartForQuestionAnswering.encode.attention_mask",description:`<strong>attention_mask</strong> (<code>jnp.ndarray</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.FlaxMBartForQuestionAnswering.encode.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxMBartForQuestionAnswering.encode.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.FlaxMBartForQuestionAnswering.encode.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.FlaxMBartForQuestionAnswering.encode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1038",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</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 (<code>&lt;class 'transformers.models.mbart.configuration_mbart.MBartConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ma=new A({props:{anchor:"transformers.FlaxMBartForQuestionAnswering.encode.example",$$slots:{default:[M1]},$$scope:{ctx:M}}}),bi=new F({props:{name:"decode",anchor:"transformers.FlaxMBartForQuestionAnswering.decode",parameters:[{name:"decoder_input_ids",val:""},{name:"encoder_outputs",val:""},{name:"encoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"past_key_values",val:": dict = 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"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxMBartForQuestionAnswering.decode.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>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.FlaxMBartForQuestionAnswering.decode.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(jnp.ndarray)</code>) &#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.FlaxMBartForQuestionAnswering.decode.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>jnp.ndarray</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:"encoder_attention_mask"},{anchor:"transformers.FlaxMBartForQuestionAnswering.decode.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>jnp.ndarray</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 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.FlaxMBartForQuestionAnswering.decode.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxMBartForQuestionAnswering.decode.past_key_values",description:`<strong>past_key_values</strong> (<code>Dict[str, np.ndarray]</code>, <em>optional</em>, returned by <code>init_cache</code> or when passing previous <code>past_key_values</code>) &#x2014;
Dictionary of pre-computed hidden-states (key and values in the attention blocks) that can be used for fast
auto-regressive decoding. Pre-computed key and value hidden-states are of shape <em>[batch_size, max_length]</em>.`,name:"past_key_values"},{anchor:"transformers.FlaxMBartForQuestionAnswering.decode.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.FlaxMBartForQuestionAnswering.decode.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.FlaxMBartForQuestionAnswering.decode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1101",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</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 (<code>&lt;class 'transformers.models.mbart.configuration_mbart.MBartConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
<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(jnp.ndarray))</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(jnp.ndarray)</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 optionally if
<code>config.is_encoder_decoder=True</code> 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 optionally if
<code>config.is_encoder_decoder=True</code> 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>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</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>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_a=new A({props:{anchor:"transformers.FlaxMBartForQuestionAnswering.decode.example",$$slots:{default:[z1]},$$scope:{ctx:M}}}),{c(){l=a("meta"),b=c(),f=a("h1"),h=a("a"),k=a("span"),v(n.$$.fragment),u=c(),q=a("span"),bt=i("MBart and MBart-50"),ot=c(),X=a("div"),Se=a("a"),he=a("img"),vt=c(),ee=a("a"),Oe=a("img"),me=c(),re=a("p"),Xe=a("strong"),Te=i("DISCLAIMER:"),yt=i(" If you see something strange, file a "),we=a("a"),$e=i("Github Issue"),Tt=i(` and assign
@patrickvonplaten`),nt=c(),Q=a("h2"),fe=a("a"),Qe=a("span"),v(ie.$$.fragment),O=c(),I=a("span"),wt=i("Overview of MBart"),_e=c(),ge=a("p"),$t=i("The MBart model was presented in "),J=a("a"),xt=i("Multilingual Denoising Pre-training for Neural Machine Translation"),Mt=i(` by Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov Marjan
Ghazvininejad, Mike Lewis, Luke Zettlemoyer.`),U=c(),Ie=a("p"),xe=i(`According to the abstract, MBART is a sequence-to-sequence denoising auto-encoder pretrained on large-scale monolingual
corpora in many languages using the BART objective. mBART is one of the first methods for pretraining a complete
sequence-to-sequence model by denoising full texts in multiple languages, while previous approaches have focused only
on the encoder, decoder, or reconstructing parts of the text.`),at=c(),de=a("p"),Me=i("This model was contributed by "),ze=a("a"),zt=i("valhalla"),le=i(". The Authors\u2019 code can be found "),Fe=a("a"),qe=i("here"),st=c(),Z=a("h3"),S=a("a"),He=a("span"),v(N.$$.fragment),Ft=c(),Ve=a("span"),z=i("Training of MBart"),B=c(),K=a("p"),Ke=i(`MBart is a multilingual encoder-decoder (sequence-to-sequence) model primarily intended for translation task. As the
model is multilingual it expects the sequences in a different format. A special language id token is added in both the
source and target text. The source text format is `),qt=a("code"),Jt=i("X [eos, src_lang_code]"),C=i(" where "),jt=a("code"),Zt=i("X"),Yt=i(` is the source text. The
target text format is `),Bt=a("code"),eo=i("[tgt_lang_code] X [eos]"),ce=i(". "),pe=a("code"),to=i("bos"),oo=i(" is never used."),ke=c(),te=a("p"),no=i("The regular "),je=a("a"),Et=a("strong"),Je=i("call"),ao=i("()"),dm=i(" will encode source text format passed as first argument or with the "),qd=a("code"),lm=i("text"),cm=i(`
keyword, and target text format passed with the `),jd=a("code"),pm=i("text_label"),um=i(" keyword argument."),Np=c(),Mi=a("ul"),Bd=a("li"),hm=i("Supervised training"),Dp=c(),v(Sa.$$.fragment),Lp=c(),zi=a("ul"),Oa=a("li"),Ed=a("p"),mm=i("Generation"),fm=c(),so=a("p"),_m=i("While generating the target text set the "),Cd=a("code"),gm=i("decoder_start_token_id"),km=i(` to the target language id. The following
example shows how to translate English to Romanian using the `),Ad=a("em"),bm=i("facebook/mbart-large-en-ro"),vm=i(" model."),Gp=c(),v(Ia.$$.fragment),Wp=c(),ro=a("h2"),Xo=a("a"),Pd=a("span"),v(Na.$$.fragment),ym=c(),Sd=a("span"),Tm=i("Overview of MBart-50"),Up=c(),Dt=a("p"),wm=i("MBart-50 was introduced in the "),Da=a("a"),$m=i("Multilingual Translation with Extensible Multilingual Pretraining and Finetuning"),xm=i(` paper by Yuqing Tang, Chau Tran, Xian Li, Peng-Jen Chen, Naman Goyal, Vishrav
Chaudhary, Jiatao Gu, Angela Fan. MBart-50 is created using the original `),Od=a("em"),Mm=i("mbart-large-cc25"),zm=i(` checkpoint by extendeding
its embedding layers with randomly initialized vectors for an extra set of 25 language tokens and then pretrained on 50
languages.`),Rp=c(),Fi=a("p"),Fm=i("According to the abstract"),Xp=c(),qi=a("p"),Id=a("em"),qm=i(`Multilingual translation models can be created through multilingual finetuning. Instead of finetuning on one
direction, a pretrained model is finetuned on many directions at the same time. It demonstrates that pretrained models
can be extended to incorporate additional languages without loss of performance. Multilingual finetuning improves on
average 1 BLEU over the strongest baselines (being either multilingual from scratch or bilingual finetuning) while
improving 9.3 BLEU on average over bilingual baselines from scratch.`),Qp=c(),io=a("h3"),Qo=a("a"),Nd=a("span"),v(La.$$.fragment),jm=c(),Dd=a("span"),Bm=i("Training of MBart-50"),Hp=c(),rt=a("p"),Em=i(`The text format for MBart-50 is slightly different from mBART. For MBart-50 the language id token is used as a prefix
for both source and target text i.e the text format is `),Ld=a("code"),Cm=i("[lang_code] X [eos]"),Am=i(", where "),Gd=a("code"),Pm=i("lang_code"),Sm=i(` is source
language id for source text and target language id for target text, with `),Wd=a("code"),Om=i("X"),Im=i(` being the source or target text
respectively.`),Vp=c(),Ho=a("p"),Nm=i("MBart-50 has its own tokenizer "),ji=a("a"),Dm=i("MBart50Tokenizer"),Lm=i("."),Kp=c(),Bi=a("ul"),Ud=a("li"),Gm=i("Supervised training"),Jp=c(),v(Ga.$$.fragment),Zp=c(),Ei=a("ul"),Wa=a("li"),Rd=a("p"),Wm=i("Generation"),Um=c(),Be=a("p"),Rm=i("To generate using the mBART-50 multilingual translation models, "),Xd=a("code"),Xm=i("eos_token_id"),Qm=i(` is used as the
`),Qd=a("code"),Hm=i("decoder_start_token_id"),Vm=i(` and the target language id is forced as the first generated token. To force the
target language id as the first generated token, pass the `),Hd=a("em"),Km=i("forced_bos_token_id"),Jm=i(" parameter to the "),Vd=a("em"),Zm=i("generate"),Ym=i(` method.
The following example shows how to translate between Hindi to French and Arabic to English using the
`),Kd=a("em"),ef=i("facebook/mbart-50-large-many-to-many"),tf=i(" checkpoint."),Yp=c(),v(Ua.$$.fragment),eu=c(),lo=a("h2"),Vo=a("a"),Jd=a("span"),v(Ra.$$.fragment),of=c(),Zd=a("span"),nf=i("Documentation resources"),tu=c(),be=a("ul"),Yd=a("li"),Ci=a("a"),af=i("Text classification task guide"),sf=c(),el=a("li"),Ai=a("a"),rf=i("Question answering task guide"),df=c(),tl=a("li"),Pi=a("a"),lf=i("Causal language modeling task guide"),cf=c(),ol=a("li"),Si=a("a"),pf=i("Masked language modeling task guide"),uf=c(),nl=a("li"),Oi=a("a"),hf=i("Translation task guide"),mf=c(),al=a("li"),Ii=a("a"),ff=i("Summarization task guide"),ou=c(),co=a("h2"),Ko=a("a"),sl=a("span"),v(Xa.$$.fragment),_f=c(),rl=a("span"),gf=i("MBartConfig"),nu=c(),Ze=a("div"),v(Qa.$$.fragment),kf=c(),po=a("p"),bf=i("This is the configuration class to store the configuration of a "),Ni=a("a"),vf=i("MBartModel"),yf=i(`. It is used to instantiate an MBART
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 MBART
`),Ha=a("a"),Tf=i("facebook/mbart-large-cc25"),wf=i(" architecture."),$f=c(),uo=a("p"),xf=i("Configuration objects inherit from "),Di=a("a"),Mf=i("PretrainedConfig"),zf=i(` and can be used to control the model outputs. Read the
documentation from `),Li=a("a"),Ff=i("PretrainedConfig"),qf=i(" for more information."),jf=c(),v(Jo.$$.fragment),au=c(),ho=a("h2"),Zo=a("a"),il=a("span"),v(Va.$$.fragment),Bf=c(),dl=a("span"),Ef=i("MBartTokenizer"),su=c(),ue=a("div"),v(Ka.$$.fragment),Cf=c(),ll=a("p"),Af=i("Construct an MBART tokenizer."),Pf=c(),Ct=a("p"),Sf=i("Adapted from "),Gi=a("a"),Of=i("RobertaTokenizer"),If=i(" and "),Wi=a("a"),Nf=i("XLNetTokenizer"),Df=i(`. Based on
`),Ja=a("a"),Lf=i("SentencePiece"),Gf=i("."),Wf=c(),mo=a("p"),Uf=i("The tokenization method is "),cl=a("code"),Rf=i("<tokens> <eos> <language code>"),Xf=i(" for source language documents, and "),pl=a("code"),Qf=i("<language code> <tokens> <eos>"),Hf=i(" for target language documents."),Vf=c(),v(Yo.$$.fragment),Kf=c(),it=a("div"),v(Za.$$.fragment),Jf=c(),Ya=a("p"),Zf=i(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An MBART sequence has the following format, where `),ul=a("code"),Yf=i("X"),e_=i(" represents the sequence:"),t_=c(),es=a("ul"),ts=a("li"),hl=a("code"),o_=i("input_ids"),n_=i(" (for encoder) "),ml=a("code"),a_=i("X [eos, src_lang_code]"),s_=c(),os=a("li"),fl=a("code"),r_=i("decoder_input_ids"),i_=i(": (for decoder) "),_l=a("code"),d_=i("X [eos, tgt_lang_code]"),l_=c(),gl=a("p"),c_=i(`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),ru=c(),fo=a("h2"),en=a("a"),kl=a("span"),v(ns.$$.fragment),p_=c(),bl=a("span"),u_=i("MBartTokenizerFast"),iu=c(),D=a("div"),v(as.$$.fragment),h_=c(),_o=a("p"),m_=i("Construct a \u201Cfast\u201D MBART tokenizer (backed by HuggingFace\u2019s "),vl=a("em"),f_=i("tokenizers"),__=i(` library). Based on
`),ss=a("a"),g_=i("BPE"),k_=i("."),b_=c(),rs=a("p"),v_=i("This tokenizer inherits from "),Ui=a("a"),y_=i("PreTrainedTokenizerFast"),T_=i(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),w_=c(),go=a("p"),$_=i("The tokenization method is "),yl=a("code"),x_=i("<tokens> <eos> <language code>"),M_=i(" for source language documents, and "),Tl=a("code"),z_=i("<language code> <tokens> <eos>"),F_=i(" for target language documents."),q_=c(),v(tn.$$.fragment),j_=c(),Ne=a("div"),v(is.$$.fragment),B_=c(),wl=a("p"),E_=i(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. The special tokens depend on calling set_lang.`),C_=c(),ds=a("p"),A_=i("An MBART sequence has the following format, where "),$l=a("code"),P_=i("X"),S_=i(" represents the sequence:"),O_=c(),ls=a("ul"),cs=a("li"),xl=a("code"),I_=i("input_ids"),N_=i(" (for encoder) "),Ml=a("code"),D_=i("X [eos, src_lang_code]"),L_=c(),ps=a("li"),zl=a("code"),G_=i("decoder_input_ids"),W_=i(": (for decoder) "),Fl=a("code"),U_=i("X [eos, tgt_lang_code]"),R_=c(),ql=a("p"),X_=i(`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),Q_=c(),on=a("div"),v(us.$$.fragment),H_=c(),jl=a("p"),V_=i(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. mBART does not
make use of token type ids, therefore a list of zeros is returned.`),K_=c(),nn=a("div"),v(hs.$$.fragment),J_=c(),Bl=a("p"),Z_=i("Reset the special tokens to the source lang setting. No prefix and suffix=[eos, src_lang_code]."),Y_=c(),an=a("div"),v(ms.$$.fragment),eg=c(),El=a("p"),tg=i("Reset the special tokens to the target language setting. No prefix and suffix=[eos, tgt_lang_code]."),du=c(),ko=a("h2"),sn=a("a"),Cl=a("span"),v(fs.$$.fragment),og=c(),Al=a("span"),ng=i("MBart50Tokenizer"),lu=c(),L=a("div"),v(_s.$$.fragment),ag=c(),gs=a("p"),sg=i("Construct a MBart50 tokenizer. Based on "),ks=a("a"),rg=i("SentencePiece"),ig=i("."),dg=c(),bs=a("p"),lg=i("This tokenizer inherits from "),Ri=a("a"),cg=i("PreTrainedTokenizer"),pg=i(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),ug=c(),v(rn.$$.fragment),hg=c(),dt=a("div"),v(vs.$$.fragment),mg=c(),ys=a("p"),fg=i(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An MBART-50 sequence has the following format, where `),Pl=a("code"),_g=i("X"),gg=i(" represents the sequence:"),kg=c(),Ts=a("ul"),ws=a("li"),Sl=a("code"),bg=i("input_ids"),vg=i(" (for encoder) "),Ol=a("code"),yg=i("[src_lang_code] X [eos]"),Tg=c(),$s=a("li"),Il=a("code"),wg=i("labels"),$g=i(": (for decoder) "),Nl=a("code"),xg=i("[tgt_lang_code] X [eos]"),Mg=c(),Dl=a("p"),zg=i(`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),Fg=c(),dn=a("div"),v(xs.$$.fragment),qg=c(),Ll=a("p"),jg=i("Converts a sequence of tokens (string) in a single string."),Bg=c(),ln=a("div"),v(Ms.$$.fragment),Eg=c(),zs=a("p"),Cg=i(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Gl=a("code"),Ag=i("prepare_for_model"),Pg=i(" method."),Sg=c(),cn=a("div"),v(Fs.$$.fragment),Og=c(),Wl=a("p"),Ig=i("Reset the special tokens to the source lang setting. prefix=[src_lang_code] and suffix=[eos]."),Ng=c(),pn=a("div"),v(qs.$$.fragment),Dg=c(),Ul=a("p"),Lg=i("Reset the special tokens to the target language setting. prefix=[tgt_lang_code] and suffix=[eos]."),cu=c(),bo=a("h2"),un=a("a"),Rl=a("span"),v(js.$$.fragment),Gg=c(),Xl=a("span"),Wg=i("MBart50TokenizerFast"),pu=c(),Y=a("div"),v(Bs.$$.fragment),Ug=c(),vo=a("p"),Rg=i("Construct a \u201Cfast\u201D MBART tokenizer for mBART-50 (backed by HuggingFace\u2019s "),Ql=a("em"),Xg=i("tokenizers"),Qg=i(` library). Based on
`),Es=a("a"),Hg=i("BPE"),Vg=i("."),Kg=c(),Cs=a("p"),Jg=i("This tokenizer inherits from "),Xi=a("a"),Zg=i("PreTrainedTokenizerFast"),Yg=i(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),ek=c(),v(hn.$$.fragment),tk=c(),De=a("div"),v(As.$$.fragment),ok=c(),Hl=a("p"),nk=i(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. The special tokens depend on calling set_lang.`),ak=c(),Ps=a("p"),sk=i("An MBART-50 sequence has the following format, where "),Vl=a("code"),rk=i("X"),ik=i(" represents the sequence:"),dk=c(),Ss=a("ul"),Os=a("li"),Kl=a("code"),lk=i("input_ids"),ck=i(" (for encoder) "),Jl=a("code"),pk=i("[src_lang_code] X [eos]"),uk=c(),Is=a("li"),Zl=a("code"),hk=i("labels"),mk=i(": (for decoder) "),Yl=a("code"),fk=i("[tgt_lang_code] X [eos]"),_k=c(),ec=a("p"),gk=i(`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),kk=c(),mn=a("div"),v(Ns.$$.fragment),bk=c(),tc=a("p"),vk=i("Reset the special tokens to the source lang setting. prefix=[src_lang_code] and suffix=[eos]."),yk=c(),fn=a("div"),v(Ds.$$.fragment),Tk=c(),oc=a("p"),wk=i("Reset the special tokens to the target language setting. prefix=[src_lang_code] and suffix=[eos]."),uu=c(),yo=a("h2"),_n=a("a"),nc=a("span"),v(Ls.$$.fragment),$k=c(),ac=a("span"),xk=i("MBartModel"),hu=c(),Ye=a("div"),v(Gs.$$.fragment),Mk=c(),Ws=a("p"),zk=i(`The bare MBART Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Qi=a("a"),Fk=i("PreTrainedModel"),qk=i(`. 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.)`),jk=c(),Us=a("p"),Bk=i("This model is also a PyTorch "),Rs=a("a"),Ek=i("torch.nn.Module"),Ck=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ak=c(),lt=a("div"),v(Xs.$$.fragment),Pk=c(),To=a("p"),Sk=i("The "),Hi=a("a"),Ok=i("MBartModel"),Ik=i(" forward method, overrides the "),sc=a("code"),Nk=i("__call__"),Dk=i(" special method."),Lk=c(),v(gn.$$.fragment),Gk=c(),v(kn.$$.fragment),mu=c(),wo=a("h2"),bn=a("a"),rc=a("span"),v(Qs.$$.fragment),Wk=c(),ic=a("span"),Uk=i("MBartForConditionalGeneration"),fu=c(),et=a("div"),v(Hs.$$.fragment),Rk=c(),Vs=a("p"),Xk=i(`The MBART Model with a language modeling head. Can be used for summarization, after fine-tuning the pretrained models.
This model inherits from `),Vi=a("a"),Qk=i("PreTrainedModel"),Hk=i(`. 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.)`),Vk=c(),Ks=a("p"),Kk=i("This model is also a PyTorch "),Js=a("a"),Jk=i("torch.nn.Module"),Zk=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Yk=c(),Le=a("div"),v(Zs.$$.fragment),eb=c(),$o=a("p"),tb=i("The "),Ki=a("a"),ob=i("MBartForConditionalGeneration"),nb=i(" forward method, overrides the "),dc=a("code"),ab=i("__call__"),sb=i(" special method."),rb=c(),v(vn.$$.fragment),ib=c(),v(yn.$$.fragment),db=c(),v(Tn.$$.fragment),_u=c(),xo=a("h2"),wn=a("a"),lc=a("span"),v(Ys.$$.fragment),lb=c(),cc=a("span"),cb=i("MBartForQuestionAnswering"),gu=c(),Ee=a("div"),v(er.$$.fragment),pb=c(),Mo=a("p"),ub=i(`MBART 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 `),pc=a("code"),hb=i("span start logits"),mb=i(" and "),uc=a("code"),fb=i("span end logits"),_b=i(")."),gb=c(),tr=a("p"),kb=i("This model inherits from "),Ji=a("a"),bb=i("PreTrainedModel"),vb=i(`. 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.)`),yb=c(),or=a("p"),Tb=i("This model is also a PyTorch "),nr=a("a"),wb=i("torch.nn.Module"),$b=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),xb=c(),ct=a("div"),v(ar.$$.fragment),Mb=c(),zo=a("p"),zb=i("The "),Zi=a("a"),Fb=i("MBartForQuestionAnswering"),qb=i(" forward method, overrides the "),hc=a("code"),jb=i("__call__"),Bb=i(" special method."),Eb=c(),v($n.$$.fragment),Cb=c(),v(xn.$$.fragment),ku=c(),Fo=a("h2"),Mn=a("a"),mc=a("span"),v(sr.$$.fragment),Ab=c(),fc=a("span"),Pb=i("MBartForSequenceClassification"),bu=c(),Ce=a("div"),v(rr.$$.fragment),Sb=c(),_c=a("p"),Ob=i(`MBart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),Ib=c(),ir=a("p"),Nb=i("This model inherits from "),Yi=a("a"),Db=i("PreTrainedModel"),Lb=i(`. 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.)`),Gb=c(),dr=a("p"),Wb=i("This model is also a PyTorch "),lr=a("a"),Ub=i("torch.nn.Module"),Rb=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Xb=c(),Ge=a("div"),v(cr.$$.fragment),Qb=c(),qo=a("p"),Hb=i("The "),ed=a("a"),Vb=i("MBartForSequenceClassification"),Kb=i(" forward method, overrides the "),gc=a("code"),Jb=i("__call__"),Zb=i(" special method."),Yb=c(),v(zn.$$.fragment),ev=c(),v(Fn.$$.fragment),tv=c(),v(qn.$$.fragment),vu=c(),jo=a("h2"),jn=a("a"),kc=a("span"),v(pr.$$.fragment),ov=c(),bc=a("span"),nv=i("MBartForCausalLM"),yu=c(),Bo=a("div"),v(ur.$$.fragment),av=c(),Bn=a("div"),v(hr.$$.fragment),sv=c(),v(En.$$.fragment),Tu=c(),Eo=a("h2"),Cn=a("a"),vc=a("span"),v(mr.$$.fragment),rv=c(),yc=a("span"),iv=i("TFMBartModel"),wu=c(),Ae=a("div"),v(fr.$$.fragment),dv=c(),_r=a("p"),lv=i(`The bare MBART Model outputting raw hidden-states without any specific head on top.
This model inherits from `),td=a("a"),cv=i("TFPreTrainedModel"),pv=i(`. 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.)`),uv=c(),gr=a("p"),hv=i("This model is also a "),kr=a("a"),mv=i("tf.keras.Model"),fv=i(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),_v=c(),v(An.$$.fragment),gv=c(),pt=a("div"),v(br.$$.fragment),kv=c(),Co=a("p"),bv=i("The "),od=a("a"),vv=i("TFMBartModel"),yv=i(" forward method, overrides the "),Tc=a("code"),Tv=i("__call__"),wv=i(" special method."),$v=c(),v(Pn.$$.fragment),xv=c(),v(Sn.$$.fragment),$u=c(),Ao=a("h2"),On=a("a"),wc=a("span"),v(vr.$$.fragment),Mv=c(),$c=a("span"),zv=i("TFMBartForConditionalGeneration"),xu=c(),Pe=a("div"),v(yr.$$.fragment),Fv=c(),Tr=a("p"),qv=i(`The MBART Model with a language modeling head. Can be used for summarization, after fine-tuning the pretrained models.
This model inherits from `),nd=a("a"),jv=i("TFPreTrainedModel"),Bv=i(`. 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.)`),Ev=c(),wr=a("p"),Cv=i("This model is also a "),$r=a("a"),Av=i("tf.keras.Model"),Pv=i(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Sv=c(),v(In.$$.fragment),Ov=c(),We=a("div"),v(xr.$$.fragment),Iv=c(),Po=a("p"),Nv=i("The "),ad=a("a"),Dv=i("TFMBartForConditionalGeneration"),Lv=i(" forward method, overrides the "),xc=a("code"),Gv=i("__call__"),Wv=i(" special method."),Uv=c(),v(Nn.$$.fragment),Rv=c(),v(Dn.$$.fragment),Xv=c(),v(Ln.$$.fragment),Mu=c(),So=a("h2"),Gn=a("a"),Mc=a("span"),v(Mr.$$.fragment),Qv=c(),zc=a("span"),Hv=i("FlaxMBartModel"),zu=c(),H=a("div"),v(zr.$$.fragment),Vv=c(),Fr=a("p"),Kv=i(`The bare MBart Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),sd=a("a"),Jv=i("FlaxPreTrainedModel"),Zv=i(`. 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.)`),Yv=c(),qr=a("p"),ey=i(`This model is also a Flax Linen
`),jr=a("a"),ty=i("flax.nn.Module"),oy=i(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),ny=c(),Fc=a("p"),ay=i("Finally, this model supports inherent JAX features such as:"),sy=c(),At=a("ul"),qc=a("li"),Br=a("a"),ry=i("Just-In-Time (JIT) compilation"),iy=c(),jc=a("li"),Er=a("a"),dy=i("Automatic Differentiation"),ly=c(),Bc=a("li"),Cr=a("a"),cy=i("Vectorization"),py=c(),Ec=a("li"),Ar=a("a"),uy=i("Parallelization"),hy=c(),ut=a("div"),v(Pr.$$.fragment),my=c(),Oo=a("p"),fy=i("The "),Cc=a("code"),_y=i("FlaxMBartPreTrainedModel"),gy=i(" forward method, overrides the "),Ac=a("code"),ky=i("__call__"),by=i(" special method."),vy=c(),v(Wn.$$.fragment),yy=c(),v(Un.$$.fragment),Ty=c(),Rn=a("div"),v(Sr.$$.fragment),wy=c(),v(Xn.$$.fragment),$y=c(),Qn=a("div"),v(Or.$$.fragment),xy=c(),v(Hn.$$.fragment),Fu=c(),Io=a("h2"),Vn=a("a"),Pc=a("span"),v(Ir.$$.fragment),My=c(),Sc=a("span"),zy=i("FlaxMBartForConditionalGeneration"),qu=c(),V=a("div"),v(Nr.$$.fragment),Fy=c(),Dr=a("p"),qy=i(`The MMBart Model with a language modeling head. Can be used for summarization.
This model inherits from `),rd=a("a"),jy=i("FlaxPreTrainedModel"),By=i(`. 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.)`),Ey=c(),Lr=a("p"),Cy=i(`This model is also a Flax Linen
`),Gr=a("a"),Ay=i("flax.nn.Module"),Py=i(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Sy=c(),Oc=a("p"),Oy=i("Finally, this model supports inherent JAX features such as:"),Iy=c(),Pt=a("ul"),Ic=a("li"),Wr=a("a"),Ny=i("Just-In-Time (JIT) compilation"),Dy=c(),Nc=a("li"),Ur=a("a"),Ly=i("Automatic Differentiation"),Gy=c(),Dc=a("li"),Rr=a("a"),Wy=i("Vectorization"),Uy=c(),Lc=a("li"),Xr=a("a"),Ry=i("Parallelization"),Xy=c(),Ue=a("div"),v(Qr.$$.fragment),Qy=c(),No=a("p"),Hy=i("The "),Gc=a("code"),Vy=i("FlaxMBartPreTrainedModel"),Ky=i(" forward method, overrides the "),Wc=a("code"),Jy=i("__call__"),Zy=i(" special method."),Yy=c(),v(Kn.$$.fragment),eT=c(),v(Jn.$$.fragment),tT=c(),v(Zn.$$.fragment),oT=c(),Yn=a("div"),v(Hr.$$.fragment),nT=c(),v(ea.$$.fragment),aT=c(),ta=a("div"),v(Vr.$$.fragment),sT=c(),v(oa.$$.fragment),ju=c(),Do=a("h2"),na=a("a"),Uc=a("span"),v(Kr.$$.fragment),rT=c(),Rc=a("span"),iT=i("FlaxMBartForSequenceClassification"),Bu=c(),G=a("div"),v(Jr.$$.fragment),dT=c(),Xc=a("p"),lT=i(`MBart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),cT=c(),Zr=a("p"),pT=i("This model inherits from "),id=a("a"),uT=i("FlaxPreTrainedModel"),hT=i(`. 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.)`),mT=c(),Yr=a("p"),fT=i(`This model is also a Flax Linen
`),ei=a("a"),_T=i("flax.nn.Module"),gT=i(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),kT=c(),Qc=a("p"),bT=i("Finally, this model supports inherent JAX features such as:"),vT=c(),St=a("ul"),Hc=a("li"),ti=a("a"),yT=i("Just-In-Time (JIT) compilation"),TT=c(),Vc=a("li"),oi=a("a"),wT=i("Automatic Differentiation"),$T=c(),Kc=a("li"),ni=a("a"),xT=i("Vectorization"),MT=c(),Jc=a("li"),ai=a("a"),zT=i("Parallelization"),FT=c(),ht=a("div"),v(si.$$.fragment),qT=c(),Lo=a("p"),jT=i("The "),Zc=a("code"),BT=i("FlaxMBartPreTrainedModel"),ET=i(" forward method, overrides the "),Yc=a("code"),CT=i("__call__"),AT=i(" special method."),PT=c(),v(aa.$$.fragment),ST=c(),v(sa.$$.fragment),OT=c(),ra=a("div"),v(ri.$$.fragment),IT=c(),v(ia.$$.fragment),NT=c(),da=a("div"),v(ii.$$.fragment),DT=c(),v(la.$$.fragment),Eu=c(),Go=a("h2"),ca=a("a"),ep=a("span"),v(di.$$.fragment),LT=c(),tp=a("span"),GT=i("FlaxMBartForQuestionAnswering"),Cu=c(),W=a("div"),v(li.$$.fragment),WT=c(),Wo=a("p"),UT=i(`MBart 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 `),op=a("code"),RT=i("span start logits"),XT=i(" and "),np=a("code"),QT=i("span end logits"),HT=i(")."),VT=c(),ci=a("p"),KT=i("This model inherits from "),dd=a("a"),JT=i("FlaxPreTrainedModel"),ZT=i(`. 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.)`),YT=c(),pi=a("p"),e2=i(`This model is also a Flax Linen
`),ui=a("a"),t2=i("flax.nn.Module"),o2=i(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),n2=c(),ap=a("p"),a2=i("Finally, this model supports inherent JAX features such as:"),s2=c(),Ot=a("ul"),sp=a("li"),hi=a("a"),r2=i("Just-In-Time (JIT) compilation"),i2=c(),rp=a("li"),mi=a("a"),d2=i("Automatic Differentiation"),l2=c(),ip=a("li"),fi=a("a"),c2=i("Vectorization"),p2=c(),dp=a("li"),_i=a("a"),u2=i("Parallelization"),h2=c(),mt=a("div"),v(gi.$$.fragment),m2=c(),Uo=a("p"),f2=i("The "),lp=a("code"),_2=i("FlaxMBartPreTrainedModel"),g2=i(" forward method, overrides the "),cp=a("code"),k2=i("__call__"),b2=i(" special method."),v2=c(),v(pa.$$.fragment),y2=c(),v(ua.$$.fragment),T2=c(),ha=a("div"),v(ki.$$.fragment),w2=c(),v(ma.$$.fragment),$2=c(),fa=a("div"),v(bi.$$.fragment),x2=c(),v(_a.$$.fragment),this.h()},l(o){const _=Dx('[data-svelte="svelte-1phssyn"]',document.head);l=s(_,"META",{name:!0,content:!0}),_.forEach(t),b=p(o),f=s(o,"H1",{class:!0});var vi=r(f);h=s(vi,"A",{id:!0,class:!0,href:!0});var pp=r(h);k=s(pp,"SPAN",{});var up=r(k);y(n.$$.fragment,up),up.forEach(t),pp.forEach(t),u=p(vi),q=s(vi,"SPAN",{});var hp=r(q);bt=d(hp,"MBart and MBart-50"),hp.forEach(t),vi.forEach(t),ot=p(o),X=s(o,"DIV",{class:!0});var yi=r(X);Se=s(yi,"A",{href:!0});var mp=r(Se);he=s(mp,"IMG",{alt:!0,src:!0}),mp.forEach(t),vt=p(yi),ee=s(yi,"A",{href:!0});var fp=r(ee);Oe=s(fp,"IMG",{alt:!0,src:!0}),fp.forEach(t),yi.forEach(t),me=p(o),re=s(o,"P",{});var ga=r(re);Xe=s(ga,"STRONG",{});var _p=r(Xe);Te=d(_p,"DISCLAIMER:"),_p.forEach(t),yt=d(ga," If you see something strange, file a "),we=s(ga,"A",{href:!0,rel:!0});var gp=r(we);$e=d(gp,"Github Issue"),gp.forEach(t),Tt=d(ga,` and assign
@patrickvonplaten`),ga.forEach(t),nt=p(o),Q=s(o,"H2",{class:!0});var Ti=r(Q);fe=s(Ti,"A",{id:!0,class:!0,href:!0});var kp=r(fe);Qe=s(kp,"SPAN",{});var bp=r(Qe);y(ie.$$.fragment,bp),bp.forEach(t),kp.forEach(t),O=p(Ti),I=s(Ti,"SPAN",{});var vp=r(I);wt=d(vp,"Overview of MBart"),vp.forEach(t),Ti.forEach(t),_e=p(o),ge=s(o,"P",{});var wi=r(ge);$t=d(wi,"The MBart model was presented in "),J=s(wi,"A",{href:!0,rel:!0});var yp=r(J);xt=d(yp,"Multilingual Denoising Pre-training for Neural Machine Translation"),yp.forEach(t),Mt=d(wi,` by Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov Marjan
Ghazvininejad, Mike Lewis, Luke Zettlemoyer.`),wi.forEach(t),U=p(o),Ie=s(o,"P",{});var Tp=r(Ie);xe=d(Tp,`According to the abstract, MBART is a sequence-to-sequence denoising auto-encoder pretrained on large-scale monolingual
corpora in many languages using the BART objective. mBART is one of the first methods for pretraining a complete
sequence-to-sequence model by denoising full texts in multiple languages, while previous approaches have focused only
on the encoder, decoder, or reconstructing parts of the text.`),Tp.forEach(t),at=p(o),de=s(o,"P",{});var ka=r(de);Me=d(ka,"This model was contributed by "),ze=s(ka,"A",{href:!0,rel:!0});var wp=r(ze);zt=d(wp,"valhalla"),wp.forEach(t),le=d(ka,". The Authors\u2019 code can be found "),Fe=s(ka,"A",{href:!0,rel:!0});var $p=r(Fe);qe=d($p,"here"),$p.forEach(t),ka.forEach(t),st=p(o),Z=s(o,"H3",{class:!0});var $i=r(Z);S=s($i,"A",{id:!0,class:!0,href:!0});var xp=r(S);He=s(xp,"SPAN",{});var Mp=r(He);y(N.$$.fragment,Mp),Mp.forEach(t),xp.forEach(t),Ft=p($i),Ve=s($i,"SPAN",{});var zp=r(Ve);z=d(zp,"Training of MBart"),zp.forEach(t),$i.forEach(t),B=p(o),K=s(o,"P",{});var tt=r(K);Ke=d(tt,`MBart is a multilingual encoder-decoder (sequence-to-sequence) model primarily intended for translation task. As the
model is multilingual it expects the sequences in a different format. A special language id token is added in both the
source and target text. The source text format is `),qt=s(tt,"CODE",{});var Fp=r(qt);Jt=d(Fp,"X [eos, src_lang_code]"),Fp.forEach(t),C=d(tt," where "),jt=s(tt,"CODE",{});var qp=r(jt);Zt=d(qp,"X"),qp.forEach(t),Yt=d(tt,` is the source text. The
target text format is `),Bt=s(tt,"CODE",{});var jp=r(Bt);eo=d(jp,"[tgt_lang_code] X [eos]"),jp.forEach(t),ce=d(tt,". "),pe=s(tt,"CODE",{});var Bp=r(pe);to=d(Bp,"bos"),Bp.forEach(t),oo=d(tt," is never used."),tt.forEach(t),ke=p(o),te=s(o,"P",{});var It=r(te);no=d(It,"The regular "),je=s(It,"A",{href:!0});var ld=r(je);Et=s(ld,"STRONG",{});var Ep=r(Et);Je=d(Ep,"call"),Ep.forEach(t),ao=d(ld,"()"),ld.forEach(t),dm=d(It," will encode source text format passed as first argument or with the "),qd=s(It,"CODE",{});var Cp=r(qd);lm=d(Cp,"text"),Cp.forEach(t),cm=d(It,`
keyword, and target text format passed with the `),jd=s(It,"CODE",{});var Ap=r(jd);pm=d(Ap,"text_label"),Ap.forEach(t),um=d(It," keyword argument."),It.forEach(t),Np=p(o),Mi=s(o,"UL",{});var Pp=r(Mi);Bd=s(Pp,"LI",{});var Sp=r(Bd);hm=d(Sp,"Supervised training"),Sp.forEach(t),Pp.forEach(t),Dp=p(o),y(Sa.$$.fragment,o),Lp=p(o),zi=s(o,"UL",{});var Op=r(zi);Oa=s(Op,"LI",{});var xi=r(Oa);Ed=s(xi,"P",{});var Ip=r(Ed);mm=d(Ip,"Generation"),Ip.forEach(t),fm=p(xi),so=s(xi,"P",{});var Ro=r(so);_m=d(Ro,"While generating the target text set the "),Cd=s(Ro,"CODE",{});var M2=r(Cd);gm=d(M2,"decoder_start_token_id"),M2.forEach(t),km=d(Ro,` to the target language id. The following
example shows how to translate English to Romanian using the `),Ad=s(Ro,"EM",{});var z2=r(Ad);bm=d(z2,"facebook/mbart-large-en-ro"),z2.forEach(t),vm=d(Ro," model."),Ro.forEach(t),xi.forEach(t),Op.forEach(t),Gp=p(o),y(Ia.$$.fragment,o),Wp=p(o),ro=s(o,"H2",{class:!0});var Pu=r(ro);Xo=s(Pu,"A",{id:!0,class:!0,href:!0});var F2=r(Xo);Pd=s(F2,"SPAN",{});var q2=r(Pd);y(Na.$$.fragment,q2),q2.forEach(t),F2.forEach(t),ym=p(Pu),Sd=s(Pu,"SPAN",{});var j2=r(Sd);Tm=d(j2,"Overview of MBart-50"),j2.forEach(t),Pu.forEach(t),Up=p(o),Dt=s(o,"P",{});var cd=r(Dt);wm=d(cd,"MBart-50 was introduced in the "),Da=s(cd,"A",{href:!0,rel:!0});var B2=r(Da);$m=d(B2,"Multilingual Translation with Extensible Multilingual Pretraining and Finetuning"),B2.forEach(t),xm=d(cd,` paper by Yuqing Tang, Chau Tran, Xian Li, Peng-Jen Chen, Naman Goyal, Vishrav
Chaudhary, Jiatao Gu, Angela Fan. MBart-50 is created using the original `),Od=s(cd,"EM",{});var E2=r(Od);Mm=d(E2,"mbart-large-cc25"),E2.forEach(t),zm=d(cd,` checkpoint by extendeding
its embedding layers with randomly initialized vectors for an extra set of 25 language tokens and then pretrained on 50
languages.`),cd.forEach(t),Rp=p(o),Fi=s(o,"P",{});var C2=r(Fi);Fm=d(C2,"According to the abstract"),C2.forEach(t),Xp=p(o),qi=s(o,"P",{});var A2=r(qi);Id=s(A2,"EM",{});var P2=r(Id);qm=d(P2,`Multilingual translation models can be created through multilingual finetuning. Instead of finetuning on one
direction, a pretrained model is finetuned on many directions at the same time. It demonstrates that pretrained models
can be extended to incorporate additional languages without loss of performance. Multilingual finetuning improves on
average 1 BLEU over the strongest baselines (being either multilingual from scratch or bilingual finetuning) while
improving 9.3 BLEU on average over bilingual baselines from scratch.`),P2.forEach(t),A2.forEach(t),Qp=p(o),io=s(o,"H3",{class:!0});var Su=r(io);Qo=s(Su,"A",{id:!0,class:!0,href:!0});var S2=r(Qo);Nd=s(S2,"SPAN",{});var O2=r(Nd);y(La.$$.fragment,O2),O2.forEach(t),S2.forEach(t),jm=p(Su),Dd=s(Su,"SPAN",{});var I2=r(Dd);Bm=d(I2,"Training of MBart-50"),I2.forEach(t),Su.forEach(t),Hp=p(o),rt=s(o,"P",{});var ba=r(rt);Em=d(ba,`The text format for MBart-50 is slightly different from mBART. For MBart-50 the language id token is used as a prefix
for both source and target text i.e the text format is `),Ld=s(ba,"CODE",{});var N2=r(Ld);Cm=d(N2,"[lang_code] X [eos]"),N2.forEach(t),Am=d(ba,", where "),Gd=s(ba,"CODE",{});var D2=r(Gd);Pm=d(D2,"lang_code"),D2.forEach(t),Sm=d(ba,` is source
language id for source text and target language id for target text, with `),Wd=s(ba,"CODE",{});var L2=r(Wd);Om=d(L2,"X"),L2.forEach(t),Im=d(ba,` being the source or target text
respectively.`),ba.forEach(t),Vp=p(o),Ho=s(o,"P",{});var Ou=r(Ho);Nm=d(Ou,"MBart-50 has its own tokenizer "),ji=s(Ou,"A",{href:!0});var G2=r(ji);Dm=d(G2,"MBart50Tokenizer"),G2.forEach(t),Lm=d(Ou,"."),Ou.forEach(t),Kp=p(o),Bi=s(o,"UL",{});var W2=r(Bi);Ud=s(W2,"LI",{});var U2=r(Ud);Gm=d(U2,"Supervised training"),U2.forEach(t),W2.forEach(t),Jp=p(o),y(Ga.$$.fragment,o),Zp=p(o),Ei=s(o,"UL",{});var R2=r(Ei);Wa=s(R2,"LI",{});var Iu=r(Wa);Rd=s(Iu,"P",{});var X2=r(Rd);Wm=d(X2,"Generation"),X2.forEach(t),Um=p(Iu),Be=s(Iu,"P",{});var ft=r(Be);Rm=d(ft,"To generate using the mBART-50 multilingual translation models, "),Xd=s(ft,"CODE",{});var Q2=r(Xd);Xm=d(Q2,"eos_token_id"),Q2.forEach(t),Qm=d(ft,` is used as the
`),Qd=s(ft,"CODE",{});var H2=r(Qd);Hm=d(H2,"decoder_start_token_id"),H2.forEach(t),Vm=d(ft,` and the target language id is forced as the first generated token. To force the
target language id as the first generated token, pass the `),Hd=s(ft,"EM",{});var V2=r(Hd);Km=d(V2,"forced_bos_token_id"),V2.forEach(t),Jm=d(ft," parameter to the "),Vd=s(ft,"EM",{});var K2=r(Vd);Zm=d(K2,"generate"),K2.forEach(t),Ym=d(ft,` method.
The following example shows how to translate between Hindi to French and Arabic to English using the
`),Kd=s(ft,"EM",{});var J2=r(Kd);ef=d(J2,"facebook/mbart-50-large-many-to-many"),J2.forEach(t),tf=d(ft," checkpoint."),ft.forEach(t),Iu.forEach(t),R2.forEach(t),Yp=p(o),y(Ua.$$.fragment,o),eu=p(o),lo=s(o,"H2",{class:!0});var Nu=r(lo);Vo=s(Nu,"A",{id:!0,class:!0,href:!0});var Z2=r(Vo);Jd=s(Z2,"SPAN",{});var Y2=r(Jd);y(Ra.$$.fragment,Y2),Y2.forEach(t),Z2.forEach(t),of=p(Nu),Zd=s(Nu,"SPAN",{});var ew=r(Zd);nf=d(ew,"Documentation resources"),ew.forEach(t),Nu.forEach(t),tu=p(o),be=s(o,"UL",{});var _t=r(be);Yd=s(_t,"LI",{});var tw=r(Yd);Ci=s(tw,"A",{href:!0});var ow=r(Ci);af=d(ow,"Text classification task guide"),ow.forEach(t),tw.forEach(t),sf=p(_t),el=s(_t,"LI",{});var nw=r(el);Ai=s(nw,"A",{href:!0});var aw=r(Ai);rf=d(aw,"Question answering task guide"),aw.forEach(t),nw.forEach(t),df=p(_t),tl=s(_t,"LI",{});var sw=r(tl);Pi=s(sw,"A",{href:!0});var rw=r(Pi);lf=d(rw,"Causal language modeling task guide"),rw.forEach(t),sw.forEach(t),cf=p(_t),ol=s(_t,"LI",{});var iw=r(ol);Si=s(iw,"A",{href:!0});var dw=r(Si);pf=d(dw,"Masked language modeling task guide"),dw.forEach(t),iw.forEach(t),uf=p(_t),nl=s(_t,"LI",{});var lw=r(nl);Oi=s(lw,"A",{href:!0});var cw=r(Oi);hf=d(cw,"Translation task guide"),cw.forEach(t),lw.forEach(t),mf=p(_t),al=s(_t,"LI",{});var pw=r(al);Ii=s(pw,"A",{href:!0});var uw=r(Ii);ff=d(uw,"Summarization task guide"),uw.forEach(t),pw.forEach(t),_t.forEach(t),ou=p(o),co=s(o,"H2",{class:!0});var Du=r(co);Ko=s(Du,"A",{id:!0,class:!0,href:!0});var hw=r(Ko);sl=s(hw,"SPAN",{});var mw=r(sl);y(Xa.$$.fragment,mw),mw.forEach(t),hw.forEach(t),_f=p(Du),rl=s(Du,"SPAN",{});var fw=r(rl);gf=d(fw,"MBartConfig"),fw.forEach(t),Du.forEach(t),nu=p(o),Ze=s(o,"DIV",{class:!0});var va=r(Ze);y(Qa.$$.fragment,va),kf=p(va),po=s(va,"P",{});var pd=r(po);bf=d(pd,"This is the configuration class to store the configuration of a "),Ni=s(pd,"A",{href:!0});var _w=r(Ni);vf=d(_w,"MBartModel"),_w.forEach(t),yf=d(pd,`. It is used to instantiate an MBART
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 MBART
`),Ha=s(pd,"A",{href:!0,rel:!0});var gw=r(Ha);Tf=d(gw,"facebook/mbart-large-cc25"),gw.forEach(t),wf=d(pd," architecture."),pd.forEach(t),$f=p(va),uo=s(va,"P",{});var ud=r(uo);xf=d(ud,"Configuration objects inherit from "),Di=s(ud,"A",{href:!0});var kw=r(Di);Mf=d(kw,"PretrainedConfig"),kw.forEach(t),zf=d(ud,` and can be used to control the model outputs. Read the
documentation from `),Li=s(ud,"A",{href:!0});var bw=r(Li);Ff=d(bw,"PretrainedConfig"),bw.forEach(t),qf=d(ud," for more information."),ud.forEach(t),jf=p(va),y(Jo.$$.fragment,va),va.forEach(t),au=p(o),ho=s(o,"H2",{class:!0});var Lu=r(ho);Zo=s(Lu,"A",{id:!0,class:!0,href:!0});var vw=r(Zo);il=s(vw,"SPAN",{});var yw=r(il);y(Va.$$.fragment,yw),yw.forEach(t),vw.forEach(t),Bf=p(Lu),dl=s(Lu,"SPAN",{});var Tw=r(dl);Ef=d(Tw,"MBartTokenizer"),Tw.forEach(t),Lu.forEach(t),su=p(o),ue=s(o,"DIV",{class:!0});var gt=r(ue);y(Ka.$$.fragment,gt),Cf=p(gt),ll=s(gt,"P",{});var ww=r(ll);Af=d(ww,"Construct an MBART tokenizer."),ww.forEach(t),Pf=p(gt),Ct=s(gt,"P",{});var ya=r(Ct);Sf=d(ya,"Adapted from "),Gi=s(ya,"A",{href:!0});var $w=r(Gi);Of=d($w,"RobertaTokenizer"),$w.forEach(t),If=d(ya," and "),Wi=s(ya,"A",{href:!0});var xw=r(Wi);Nf=d(xw,"XLNetTokenizer"),xw.forEach(t),Df=d(ya,`. Based on
`),Ja=s(ya,"A",{href:!0,rel:!0});var Mw=r(Ja);Lf=d(Mw,"SentencePiece"),Mw.forEach(t),Gf=d(ya,"."),ya.forEach(t),Wf=p(gt),mo=s(gt,"P",{});var hd=r(mo);Uf=d(hd,"The tokenization method is "),cl=s(hd,"CODE",{});var zw=r(cl);Rf=d(zw,"<tokens> <eos> <language code>"),zw.forEach(t),Xf=d(hd," for source language documents, and "),pl=s(hd,"CODE",{});var Fw=r(pl);Qf=d(Fw,"<language code> <tokens> <eos>"),Fw.forEach(t),Hf=d(hd," for target language documents."),hd.forEach(t),Vf=p(gt),y(Yo.$$.fragment,gt),Kf=p(gt),it=s(gt,"DIV",{class:!0});var Ta=r(it);y(Za.$$.fragment,Ta),Jf=p(Ta),Ya=s(Ta,"P",{});var Gu=r(Ya);Zf=d(Gu,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An MBART sequence has the following format, where `),ul=s(Gu,"CODE",{});var qw=r(ul);Yf=d(qw,"X"),qw.forEach(t),e_=d(Gu," represents the sequence:"),Gu.forEach(t),t_=p(Ta),es=s(Ta,"UL",{});var Wu=r(es);ts=s(Wu,"LI",{});var Uu=r(ts);hl=s(Uu,"CODE",{});var jw=r(hl);o_=d(jw,"input_ids"),jw.forEach(t),n_=d(Uu," (for encoder) "),ml=s(Uu,"CODE",{});var Bw=r(ml);a_=d(Bw,"X [eos, src_lang_code]"),Bw.forEach(t),Uu.forEach(t),s_=p(Wu),os=s(Wu,"LI",{});var Ru=r(os);fl=s(Ru,"CODE",{});var Ew=r(fl);r_=d(Ew,"decoder_input_ids"),Ew.forEach(t),i_=d(Ru,": (for decoder) "),_l=s(Ru,"CODE",{});var Cw=r(_l);d_=d(Cw,"X [eos, tgt_lang_code]"),Cw.forEach(t),Ru.forEach(t),Wu.forEach(t),l_=p(Ta),gl=s(Ta,"P",{});var Aw=r(gl);c_=d(Aw,`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),Aw.forEach(t),Ta.forEach(t),gt.forEach(t),ru=p(o),fo=s(o,"H2",{class:!0});var Xu=r(fo);en=s(Xu,"A",{id:!0,class:!0,href:!0});var Pw=r(en);kl=s(Pw,"SPAN",{});var Sw=r(kl);y(ns.$$.fragment,Sw),Sw.forEach(t),Pw.forEach(t),p_=p(Xu),bl=s(Xu,"SPAN",{});var Ow=r(bl);u_=d(Ow,"MBartTokenizerFast"),Ow.forEach(t),Xu.forEach(t),iu=p(o),D=s(o,"DIV",{class:!0});var oe=r(D);y(as.$$.fragment,oe),h_=p(oe),_o=s(oe,"P",{});var md=r(_o);m_=d(md,"Construct a \u201Cfast\u201D MBART tokenizer (backed by HuggingFace\u2019s "),vl=s(md,"EM",{});var Iw=r(vl);f_=d(Iw,"tokenizers"),Iw.forEach(t),__=d(md,` library). Based on
`),ss=s(md,"A",{href:!0,rel:!0});var Nw=r(ss);g_=d(Nw,"BPE"),Nw.forEach(t),k_=d(md,"."),md.forEach(t),b_=p(oe),rs=s(oe,"P",{});var Qu=r(rs);v_=d(Qu,"This tokenizer inherits from "),Ui=s(Qu,"A",{href:!0});var Dw=r(Ui);y_=d(Dw,"PreTrainedTokenizerFast"),Dw.forEach(t),T_=d(Qu,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Qu.forEach(t),w_=p(oe),go=s(oe,"P",{});var fd=r(go);$_=d(fd,"The tokenization method is "),yl=s(fd,"CODE",{});var Lw=r(yl);x_=d(Lw,"<tokens> <eos> <language code>"),Lw.forEach(t),M_=d(fd," for source language documents, and "),Tl=s(fd,"CODE",{});var Gw=r(Tl);z_=d(Gw,"<language code> <tokens> <eos>"),Gw.forEach(t),F_=d(fd," for target language documents."),fd.forEach(t),q_=p(oe),y(tn.$$.fragment,oe),j_=p(oe),Ne=s(oe,"DIV",{class:!0});var Lt=r(Ne);y(is.$$.fragment,Lt),B_=p(Lt),wl=s(Lt,"P",{});var Ww=r(wl);E_=d(Ww,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. The special tokens depend on calling set_lang.`),Ww.forEach(t),C_=p(Lt),ds=s(Lt,"P",{});var Hu=r(ds);A_=d(Hu,"An MBART sequence has the following format, where "),$l=s(Hu,"CODE",{});var Uw=r($l);P_=d(Uw,"X"),Uw.forEach(t),S_=d(Hu," represents the sequence:"),Hu.forEach(t),O_=p(Lt),ls=s(Lt,"UL",{});var Vu=r(ls);cs=s(Vu,"LI",{});var Ku=r(cs);xl=s(Ku,"CODE",{});var Rw=r(xl);I_=d(Rw,"input_ids"),Rw.forEach(t),N_=d(Ku," (for encoder) "),Ml=s(Ku,"CODE",{});var Xw=r(Ml);D_=d(Xw,"X [eos, src_lang_code]"),Xw.forEach(t),Ku.forEach(t),L_=p(Vu),ps=s(Vu,"LI",{});var Ju=r(ps);zl=s(Ju,"CODE",{});var Qw=r(zl);G_=d(Qw,"decoder_input_ids"),Qw.forEach(t),W_=d(Ju,": (for decoder) "),Fl=s(Ju,"CODE",{});var Hw=r(Fl);U_=d(Hw,"X [eos, tgt_lang_code]"),Hw.forEach(t),Ju.forEach(t),Vu.forEach(t),R_=p(Lt),ql=s(Lt,"P",{});var Vw=r(ql);X_=d(Vw,`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),Vw.forEach(t),Lt.forEach(t),Q_=p(oe),on=s(oe,"DIV",{class:!0});var Zu=r(on);y(us.$$.fragment,Zu),H_=p(Zu),jl=s(Zu,"P",{});var Kw=r(jl);V_=d(Kw,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. mBART does not
make use of token type ids, therefore a list of zeros is returned.`),Kw.forEach(t),Zu.forEach(t),K_=p(oe),nn=s(oe,"DIV",{class:!0});var Yu=r(nn);y(hs.$$.fragment,Yu),J_=p(Yu),Bl=s(Yu,"P",{});var Jw=r(Bl);Z_=d(Jw,"Reset the special tokens to the source lang setting. No prefix and suffix=[eos, src_lang_code]."),Jw.forEach(t),Yu.forEach(t),Y_=p(oe),an=s(oe,"DIV",{class:!0});var eh=r(an);y(ms.$$.fragment,eh),eg=p(eh),El=s(eh,"P",{});var Zw=r(El);tg=d(Zw,"Reset the special tokens to the target language setting. No prefix and suffix=[eos, tgt_lang_code]."),Zw.forEach(t),eh.forEach(t),oe.forEach(t),du=p(o),ko=s(o,"H2",{class:!0});var th=r(ko);sn=s(th,"A",{id:!0,class:!0,href:!0});var Yw=r(sn);Cl=s(Yw,"SPAN",{});var e0=r(Cl);y(fs.$$.fragment,e0),e0.forEach(t),Yw.forEach(t),og=p(th),Al=s(th,"SPAN",{});var t0=r(Al);ng=d(t0,"MBart50Tokenizer"),t0.forEach(t),th.forEach(t),lu=p(o),L=s(o,"DIV",{class:!0});var ne=r(L);y(_s.$$.fragment,ne),ag=p(ne),gs=s(ne,"P",{});var oh=r(gs);sg=d(oh,"Construct a MBart50 tokenizer. Based on "),ks=s(oh,"A",{href:!0,rel:!0});var o0=r(ks);rg=d(o0,"SentencePiece"),o0.forEach(t),ig=d(oh,"."),oh.forEach(t),dg=p(ne),bs=s(ne,"P",{});var nh=r(bs);lg=d(nh,"This tokenizer inherits from "),Ri=s(nh,"A",{href:!0});var n0=r(Ri);cg=d(n0,"PreTrainedTokenizer"),n0.forEach(t),pg=d(nh,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),nh.forEach(t),ug=p(ne),y(rn.$$.fragment,ne),hg=p(ne),dt=s(ne,"DIV",{class:!0});var wa=r(dt);y(vs.$$.fragment,wa),mg=p(wa),ys=s(wa,"P",{});var ah=r(ys);fg=d(ah,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An MBART-50 sequence has the following format, where `),Pl=s(ah,"CODE",{});var a0=r(Pl);_g=d(a0,"X"),a0.forEach(t),gg=d(ah," represents the sequence:"),ah.forEach(t),kg=p(wa),Ts=s(wa,"UL",{});var sh=r(Ts);ws=s(sh,"LI",{});var rh=r(ws);Sl=s(rh,"CODE",{});var s0=r(Sl);bg=d(s0,"input_ids"),s0.forEach(t),vg=d(rh," (for encoder) "),Ol=s(rh,"CODE",{});var r0=r(Ol);yg=d(r0,"[src_lang_code] X [eos]"),r0.forEach(t),rh.forEach(t),Tg=p(sh),$s=s(sh,"LI",{});var ih=r($s);Il=s(ih,"CODE",{});var i0=r(Il);wg=d(i0,"labels"),i0.forEach(t),$g=d(ih,": (for decoder) "),Nl=s(ih,"CODE",{});var d0=r(Nl);xg=d(d0,"[tgt_lang_code] X [eos]"),d0.forEach(t),ih.forEach(t),sh.forEach(t),Mg=p(wa),Dl=s(wa,"P",{});var l0=r(Dl);zg=d(l0,`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),l0.forEach(t),wa.forEach(t),Fg=p(ne),dn=s(ne,"DIV",{class:!0});var dh=r(dn);y(xs.$$.fragment,dh),qg=p(dh),Ll=s(dh,"P",{});var c0=r(Ll);jg=d(c0,"Converts a sequence of tokens (string) in a single string."),c0.forEach(t),dh.forEach(t),Bg=p(ne),ln=s(ne,"DIV",{class:!0});var lh=r(ln);y(Ms.$$.fragment,lh),Eg=p(lh),zs=s(lh,"P",{});var ch=r(zs);Cg=d(ch,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Gl=s(ch,"CODE",{});var p0=r(Gl);Ag=d(p0,"prepare_for_model"),p0.forEach(t),Pg=d(ch," method."),ch.forEach(t),lh.forEach(t),Sg=p(ne),cn=s(ne,"DIV",{class:!0});var ph=r(cn);y(Fs.$$.fragment,ph),Og=p(ph),Wl=s(ph,"P",{});var u0=r(Wl);Ig=d(u0,"Reset the special tokens to the source lang setting. prefix=[src_lang_code] and suffix=[eos]."),u0.forEach(t),ph.forEach(t),Ng=p(ne),pn=s(ne,"DIV",{class:!0});var uh=r(pn);y(qs.$$.fragment,uh),Dg=p(uh),Ul=s(uh,"P",{});var h0=r(Ul);Lg=d(h0,"Reset the special tokens to the target language setting. prefix=[tgt_lang_code] and suffix=[eos]."),h0.forEach(t),uh.forEach(t),ne.forEach(t),cu=p(o),bo=s(o,"H2",{class:!0});var hh=r(bo);un=s(hh,"A",{id:!0,class:!0,href:!0});var m0=r(un);Rl=s(m0,"SPAN",{});var f0=r(Rl);y(js.$$.fragment,f0),f0.forEach(t),m0.forEach(t),Gg=p(hh),Xl=s(hh,"SPAN",{});var _0=r(Xl);Wg=d(_0,"MBart50TokenizerFast"),_0.forEach(t),hh.forEach(t),pu=p(o),Y=s(o,"DIV",{class:!0});var Re=r(Y);y(Bs.$$.fragment,Re),Ug=p(Re),vo=s(Re,"P",{});var _d=r(vo);Rg=d(_d,"Construct a \u201Cfast\u201D MBART tokenizer for mBART-50 (backed by HuggingFace\u2019s "),Ql=s(_d,"EM",{});var g0=r(Ql);Xg=d(g0,"tokenizers"),g0.forEach(t),Qg=d(_d,` library). Based on
`),Es=s(_d,"A",{href:!0,rel:!0});var k0=r(Es);Hg=d(k0,"BPE"),k0.forEach(t),Vg=d(_d,"."),_d.forEach(t),Kg=p(Re),Cs=s(Re,"P",{});var mh=r(Cs);Jg=d(mh,"This tokenizer inherits from "),Xi=s(mh,"A",{href:!0});var b0=r(Xi);Zg=d(b0,"PreTrainedTokenizerFast"),b0.forEach(t),Yg=d(mh,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),mh.forEach(t),ek=p(Re),y(hn.$$.fragment,Re),tk=p(Re),De=s(Re,"DIV",{class:!0});var Gt=r(De);y(As.$$.fragment,Gt),ok=p(Gt),Hl=s(Gt,"P",{});var v0=r(Hl);nk=d(v0,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. The special tokens depend on calling set_lang.`),v0.forEach(t),ak=p(Gt),Ps=s(Gt,"P",{});var fh=r(Ps);sk=d(fh,"An MBART-50 sequence has the following format, where "),Vl=s(fh,"CODE",{});var y0=r(Vl);rk=d(y0,"X"),y0.forEach(t),ik=d(fh," represents the sequence:"),fh.forEach(t),dk=p(Gt),Ss=s(Gt,"UL",{});var _h=r(Ss);Os=s(_h,"LI",{});var gh=r(Os);Kl=s(gh,"CODE",{});var T0=r(Kl);lk=d(T0,"input_ids"),T0.forEach(t),ck=d(gh," (for encoder) "),Jl=s(gh,"CODE",{});var w0=r(Jl);pk=d(w0,"[src_lang_code] X [eos]"),w0.forEach(t),gh.forEach(t),uk=p(_h),Is=s(_h,"LI",{});var kh=r(Is);Zl=s(kh,"CODE",{});var $0=r(Zl);hk=d($0,"labels"),$0.forEach(t),mk=d(kh,": (for decoder) "),Yl=s(kh,"CODE",{});var x0=r(Yl);fk=d(x0,"[tgt_lang_code] X [eos]"),x0.forEach(t),kh.forEach(t),_h.forEach(t),_k=p(Gt),ec=s(Gt,"P",{});var M0=r(ec);gk=d(M0,`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),M0.forEach(t),Gt.forEach(t),kk=p(Re),mn=s(Re,"DIV",{class:!0});var bh=r(mn);y(Ns.$$.fragment,bh),bk=p(bh),tc=s(bh,"P",{});var z0=r(tc);vk=d(z0,"Reset the special tokens to the source lang setting. prefix=[src_lang_code] and suffix=[eos]."),z0.forEach(t),bh.forEach(t),yk=p(Re),fn=s(Re,"DIV",{class:!0});var vh=r(fn);y(Ds.$$.fragment,vh),Tk=p(vh),oc=s(vh,"P",{});var F0=r(oc);wk=d(F0,"Reset the special tokens to the target language setting. prefix=[src_lang_code] and suffix=[eos]."),F0.forEach(t),vh.forEach(t),Re.forEach(t),uu=p(o),yo=s(o,"H2",{class:!0});var yh=r(yo);_n=s(yh,"A",{id:!0,class:!0,href:!0});var q0=r(_n);nc=s(q0,"SPAN",{});var j0=r(nc);y(Ls.$$.fragment,j0),j0.forEach(t),q0.forEach(t),$k=p(yh),ac=s(yh,"SPAN",{});var B0=r(ac);xk=d(B0,"MBartModel"),B0.forEach(t),yh.forEach(t),hu=p(o),Ye=s(o,"DIV",{class:!0});var $a=r(Ye);y(Gs.$$.fragment,$a),Mk=p($a),Ws=s($a,"P",{});var Th=r(Ws);zk=d(Th,`The bare MBART Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Qi=s(Th,"A",{href:!0});var E0=r(Qi);Fk=d(E0,"PreTrainedModel"),E0.forEach(t),qk=d(Th,`. 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.)`),Th.forEach(t),jk=p($a),Us=s($a,"P",{});var wh=r(Us);Bk=d(wh,"This model is also a PyTorch "),Rs=s(wh,"A",{href:!0,rel:!0});var C0=r(Rs);Ek=d(C0,"torch.nn.Module"),C0.forEach(t),Ck=d(wh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),wh.forEach(t),Ak=p($a),lt=s($a,"DIV",{class:!0});var xa=r(lt);y(Xs.$$.fragment,xa),Pk=p(xa),To=s(xa,"P",{});var gd=r(To);Sk=d(gd,"The "),Hi=s(gd,"A",{href:!0});var A0=r(Hi);Ok=d(A0,"MBartModel"),A0.forEach(t),Ik=d(gd," forward method, overrides the "),sc=s(gd,"CODE",{});var P0=r(sc);Nk=d(P0,"__call__"),P0.forEach(t),Dk=d(gd," special method."),gd.forEach(t),Lk=p(xa),y(gn.$$.fragment,xa),Gk=p(xa),y(kn.$$.fragment,xa),xa.forEach(t),$a.forEach(t),mu=p(o),wo=s(o,"H2",{class:!0});var $h=r(wo);bn=s($h,"A",{id:!0,class:!0,href:!0});var S0=r(bn);rc=s(S0,"SPAN",{});var O0=r(rc);y(Qs.$$.fragment,O0),O0.forEach(t),S0.forEach(t),Wk=p($h),ic=s($h,"SPAN",{});var I0=r(ic);Uk=d(I0,"MBartForConditionalGeneration"),I0.forEach(t),$h.forEach(t),fu=p(o),et=s(o,"DIV",{class:!0});var Ma=r(et);y(Hs.$$.fragment,Ma),Rk=p(Ma),Vs=s(Ma,"P",{});var xh=r(Vs);Xk=d(xh,`The MBART Model with a language modeling head. Can be used for summarization, after fine-tuning the pretrained models.
This model inherits from `),Vi=s(xh,"A",{href:!0});var N0=r(Vi);Qk=d(N0,"PreTrainedModel"),N0.forEach(t),Hk=d(xh,`. 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.)`),xh.forEach(t),Vk=p(Ma),Ks=s(Ma,"P",{});var Mh=r(Ks);Kk=d(Mh,"This model is also a PyTorch "),Js=s(Mh,"A",{href:!0,rel:!0});var D0=r(Js);Jk=d(D0,"torch.nn.Module"),D0.forEach(t),Zk=d(Mh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Mh.forEach(t),Yk=p(Ma),Le=s(Ma,"DIV",{class:!0});var Wt=r(Le);y(Zs.$$.fragment,Wt),eb=p(Wt),$o=s(Wt,"P",{});var kd=r($o);tb=d(kd,"The "),Ki=s(kd,"A",{href:!0});var L0=r(Ki);ob=d(L0,"MBartForConditionalGeneration"),L0.forEach(t),nb=d(kd," forward method, overrides the "),dc=s(kd,"CODE",{});var G0=r(dc);ab=d(G0,"__call__"),G0.forEach(t),sb=d(kd," special method."),kd.forEach(t),rb=p(Wt),y(vn.$$.fragment,Wt),ib=p(Wt),y(yn.$$.fragment,Wt),db=p(Wt),y(Tn.$$.fragment,Wt),Wt.forEach(t),Ma.forEach(t),_u=p(o),xo=s(o,"H2",{class:!0});var zh=r(xo);wn=s(zh,"A",{id:!0,class:!0,href:!0});var W0=r(wn);lc=s(W0,"SPAN",{});var U0=r(lc);y(Ys.$$.fragment,U0),U0.forEach(t),W0.forEach(t),lb=p(zh),cc=s(zh,"SPAN",{});var R0=r(cc);cb=d(R0,"MBartForQuestionAnswering"),R0.forEach(t),zh.forEach(t),gu=p(o),Ee=s(o,"DIV",{class:!0});var Ut=r(Ee);y(er.$$.fragment,Ut),pb=p(Ut),Mo=s(Ut,"P",{});var bd=r(Mo);ub=d(bd,`MBART 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 `),pc=s(bd,"CODE",{});var X0=r(pc);hb=d(X0,"span start logits"),X0.forEach(t),mb=d(bd," and "),uc=s(bd,"CODE",{});var Q0=r(uc);fb=d(Q0,"span end logits"),Q0.forEach(t),_b=d(bd,")."),bd.forEach(t),gb=p(Ut),tr=s(Ut,"P",{});var Fh=r(tr);kb=d(Fh,"This model inherits from "),Ji=s(Fh,"A",{href:!0});var H0=r(Ji);bb=d(H0,"PreTrainedModel"),H0.forEach(t),vb=d(Fh,`. 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.)`),Fh.forEach(t),yb=p(Ut),or=s(Ut,"P",{});var qh=r(or);Tb=d(qh,"This model is also a PyTorch "),nr=s(qh,"A",{href:!0,rel:!0});var V0=r(nr);wb=d(V0,"torch.nn.Module"),V0.forEach(t),$b=d(qh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),qh.forEach(t),xb=p(Ut),ct=s(Ut,"DIV",{class:!0});var za=r(ct);y(ar.$$.fragment,za),Mb=p(za),zo=s(za,"P",{});var vd=r(zo);zb=d(vd,"The "),Zi=s(vd,"A",{href:!0});var K0=r(Zi);Fb=d(K0,"MBartForQuestionAnswering"),K0.forEach(t),qb=d(vd," forward method, overrides the "),hc=s(vd,"CODE",{});var J0=r(hc);jb=d(J0,"__call__"),J0.forEach(t),Bb=d(vd," special method."),vd.forEach(t),Eb=p(za),y($n.$$.fragment,za),Cb=p(za),y(xn.$$.fragment,za),za.forEach(t),Ut.forEach(t),ku=p(o),Fo=s(o,"H2",{class:!0});var jh=r(Fo);Mn=s(jh,"A",{id:!0,class:!0,href:!0});var Z0=r(Mn);mc=s(Z0,"SPAN",{});var Y0=r(mc);y(sr.$$.fragment,Y0),Y0.forEach(t),Z0.forEach(t),Ab=p(jh),fc=s(jh,"SPAN",{});var e$=r(fc);Pb=d(e$,"MBartForSequenceClassification"),e$.forEach(t),jh.forEach(t),bu=p(o),Ce=s(o,"DIV",{class:!0});var Rt=r(Ce);y(rr.$$.fragment,Rt),Sb=p(Rt),_c=s(Rt,"P",{});var t$=r(_c);Ob=d(t$,`MBart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),t$.forEach(t),Ib=p(Rt),ir=s(Rt,"P",{});var Bh=r(ir);Nb=d(Bh,"This model inherits from "),Yi=s(Bh,"A",{href:!0});var o$=r(Yi);Db=d(o$,"PreTrainedModel"),o$.forEach(t),Lb=d(Bh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Bh.forEach(t),Gb=p(Rt),dr=s(Rt,"P",{});var Eh=r(dr);Wb=d(Eh,"This model is also a PyTorch "),lr=s(Eh,"A",{href:!0,rel:!0});var n$=r(lr);Ub=d(n$,"torch.nn.Module"),n$.forEach(t),Rb=d(Eh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Eh.forEach(t),Xb=p(Rt),Ge=s(Rt,"DIV",{class:!0});var Xt=r(Ge);y(cr.$$.fragment,Xt),Qb=p(Xt),qo=s(Xt,"P",{});var yd=r(qo);Hb=d(yd,"The "),ed=s(yd,"A",{href:!0});var a$=r(ed);Vb=d(a$,"MBartForSequenceClassification"),a$.forEach(t),Kb=d(yd," forward method, overrides the "),gc=s(yd,"CODE",{});var s$=r(gc);Jb=d(s$,"__call__"),s$.forEach(t),Zb=d(yd," special method."),yd.forEach(t),Yb=p(Xt),y(zn.$$.fragment,Xt),ev=p(Xt),y(Fn.$$.fragment,Xt),tv=p(Xt),y(qn.$$.fragment,Xt),Xt.forEach(t),Rt.forEach(t),vu=p(o),jo=s(o,"H2",{class:!0});var Ch=r(jo);jn=s(Ch,"A",{id:!0,class:!0,href:!0});var r$=r(jn);kc=s(r$,"SPAN",{});var i$=r(kc);y(pr.$$.fragment,i$),i$.forEach(t),r$.forEach(t),ov=p(Ch),bc=s(Ch,"SPAN",{});var d$=r(bc);nv=d(d$,"MBartForCausalLM"),d$.forEach(t),Ch.forEach(t),yu=p(o),Bo=s(o,"DIV",{class:!0});var Ah=r(Bo);y(ur.$$.fragment,Ah),av=p(Ah),Bn=s(Ah,"DIV",{class:!0});var Ph=r(Bn);y(hr.$$.fragment,Ph),sv=p(Ph),y(En.$$.fragment,Ph),Ph.forEach(t),Ah.forEach(t),Tu=p(o),Eo=s(o,"H2",{class:!0});var Sh=r(Eo);Cn=s(Sh,"A",{id:!0,class:!0,href:!0});var l$=r(Cn);vc=s(l$,"SPAN",{});var c$=r(vc);y(mr.$$.fragment,c$),c$.forEach(t),l$.forEach(t),rv=p(Sh),yc=s(Sh,"SPAN",{});var p$=r(yc);iv=d(p$,"TFMBartModel"),p$.forEach(t),Sh.forEach(t),wu=p(o),Ae=s(o,"DIV",{class:!0});var Qt=r(Ae);y(fr.$$.fragment,Qt),dv=p(Qt),_r=s(Qt,"P",{});var Oh=r(_r);lv=d(Oh,`The bare MBART Model outputting raw hidden-states without any specific head on top.
This model inherits from `),td=s(Oh,"A",{href:!0});var u$=r(td);cv=d(u$,"TFPreTrainedModel"),u$.forEach(t),pv=d(Oh,`. 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.)`),Oh.forEach(t),uv=p(Qt),gr=s(Qt,"P",{});var Ih=r(gr);hv=d(Ih,"This model is also a "),kr=s(Ih,"A",{href:!0,rel:!0});var h$=r(kr);mv=d(h$,"tf.keras.Model"),h$.forEach(t),fv=d(Ih,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Ih.forEach(t),_v=p(Qt),y(An.$$.fragment,Qt),gv=p(Qt),pt=s(Qt,"DIV",{class:!0});var Fa=r(pt);y(br.$$.fragment,Fa),kv=p(Fa),Co=s(Fa,"P",{});var Td=r(Co);bv=d(Td,"The "),od=s(Td,"A",{href:!0});var m$=r(od);vv=d(m$,"TFMBartModel"),m$.forEach(t),yv=d(Td," forward method, overrides the "),Tc=s(Td,"CODE",{});var f$=r(Tc);Tv=d(f$,"__call__"),f$.forEach(t),wv=d(Td," special method."),Td.forEach(t),$v=p(Fa),y(Pn.$$.fragment,Fa),xv=p(Fa),y(Sn.$$.fragment,Fa),Fa.forEach(t),Qt.forEach(t),$u=p(o),Ao=s(o,"H2",{class:!0});var Nh=r(Ao);On=s(Nh,"A",{id:!0,class:!0,href:!0});var _$=r(On);wc=s(_$,"SPAN",{});var g$=r(wc);y(vr.$$.fragment,g$),g$.forEach(t),_$.forEach(t),Mv=p(Nh),$c=s(Nh,"SPAN",{});var k$=r($c);zv=d(k$,"TFMBartForConditionalGeneration"),k$.forEach(t),Nh.forEach(t),xu=p(o),Pe=s(o,"DIV",{class:!0});var Ht=r(Pe);y(yr.$$.fragment,Ht),Fv=p(Ht),Tr=s(Ht,"P",{});var Dh=r(Tr);qv=d(Dh,`The MBART Model with a language modeling head. Can be used for summarization, after fine-tuning the pretrained models.
This model inherits from `),nd=s(Dh,"A",{href:!0});var b$=r(nd);jv=d(b$,"TFPreTrainedModel"),b$.forEach(t),Bv=d(Dh,`. 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.)`),Dh.forEach(t),Ev=p(Ht),wr=s(Ht,"P",{});var Lh=r(wr);Cv=d(Lh,"This model is also a "),$r=s(Lh,"A",{href:!0,rel:!0});var v$=r($r);Av=d(v$,"tf.keras.Model"),v$.forEach(t),Pv=d(Lh,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Lh.forEach(t),Sv=p(Ht),y(In.$$.fragment,Ht),Ov=p(Ht),We=s(Ht,"DIV",{class:!0});var Vt=r(We);y(xr.$$.fragment,Vt),Iv=p(Vt),Po=s(Vt,"P",{});var wd=r(Po);Nv=d(wd,"The "),ad=s(wd,"A",{href:!0});var y$=r(ad);Dv=d(y$,"TFMBartForConditionalGeneration"),y$.forEach(t),Lv=d(wd," forward method, overrides the "),xc=s(wd,"CODE",{});var T$=r(xc);Gv=d(T$,"__call__"),T$.forEach(t),Wv=d(wd," special method."),wd.forEach(t),Uv=p(Vt),y(Nn.$$.fragment,Vt),Rv=p(Vt),y(Dn.$$.fragment,Vt),Xv=p(Vt),y(Ln.$$.fragment,Vt),Vt.forEach(t),Ht.forEach(t),Mu=p(o),So=s(o,"H2",{class:!0});var Gh=r(So);Gn=s(Gh,"A",{id:!0,class:!0,href:!0});var w$=r(Gn);Mc=s(w$,"SPAN",{});var $$=r(Mc);y(Mr.$$.fragment,$$),$$.forEach(t),w$.forEach(t),Qv=p(Gh),zc=s(Gh,"SPAN",{});var x$=r(zc);Hv=d(x$,"FlaxMBartModel"),x$.forEach(t),Gh.forEach(t),zu=p(o),H=s(o,"DIV",{class:!0});var ve=r(H);y(zr.$$.fragment,ve),Vv=p(ve),Fr=s(ve,"P",{});var Wh=r(Fr);Kv=d(Wh,`The bare MBart Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),sd=s(Wh,"A",{href:!0});var M$=r(sd);Jv=d(M$,"FlaxPreTrainedModel"),M$.forEach(t),Zv=d(Wh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Wh.forEach(t),Yv=p(ve),qr=s(ve,"P",{});var Uh=r(qr);ey=d(Uh,`This model is also a Flax Linen
`),jr=s(Uh,"A",{href:!0,rel:!0});var z$=r(jr);ty=d(z$,"flax.nn.Module"),z$.forEach(t),oy=d(Uh,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Uh.forEach(t),ny=p(ve),Fc=s(ve,"P",{});var F$=r(Fc);ay=d(F$,"Finally, this model supports inherent JAX features such as:"),F$.forEach(t),sy=p(ve),At=s(ve,"UL",{});var qa=r(At);qc=s(qa,"LI",{});var q$=r(qc);Br=s(q$,"A",{href:!0,rel:!0});var j$=r(Br);ry=d(j$,"Just-In-Time (JIT) compilation"),j$.forEach(t),q$.forEach(t),iy=p(qa),jc=s(qa,"LI",{});var B$=r(jc);Er=s(B$,"A",{href:!0,rel:!0});var E$=r(Er);dy=d(E$,"Automatic Differentiation"),E$.forEach(t),B$.forEach(t),ly=p(qa),Bc=s(qa,"LI",{});var C$=r(Bc);Cr=s(C$,"A",{href:!0,rel:!0});var A$=r(Cr);cy=d(A$,"Vectorization"),A$.forEach(t),C$.forEach(t),py=p(qa),Ec=s(qa,"LI",{});var P$=r(Ec);Ar=s(P$,"A",{href:!0,rel:!0});var S$=r(Ar);uy=d(S$,"Parallelization"),S$.forEach(t),P$.forEach(t),qa.forEach(t),hy=p(ve),ut=s(ve,"DIV",{class:!0});var ja=r(ut);y(Pr.$$.fragment,ja),my=p(ja),Oo=s(ja,"P",{});var $d=r(Oo);fy=d($d,"The "),Cc=s($d,"CODE",{});var O$=r(Cc);_y=d(O$,"FlaxMBartPreTrainedModel"),O$.forEach(t),gy=d($d," forward method, overrides the "),Ac=s($d,"CODE",{});var I$=r(Ac);ky=d(I$,"__call__"),I$.forEach(t),by=d($d," special method."),$d.forEach(t),vy=p(ja),y(Wn.$$.fragment,ja),yy=p(ja),y(Un.$$.fragment,ja),ja.forEach(t),Ty=p(ve),Rn=s(ve,"DIV",{class:!0});var Rh=r(Rn);y(Sr.$$.fragment,Rh),wy=p(Rh),y(Xn.$$.fragment,Rh),Rh.forEach(t),$y=p(ve),Qn=s(ve,"DIV",{class:!0});var Xh=r(Qn);y(Or.$$.fragment,Xh),xy=p(Xh),y(Hn.$$.fragment,Xh),Xh.forEach(t),ve.forEach(t),Fu=p(o),Io=s(o,"H2",{class:!0});var Qh=r(Io);Vn=s(Qh,"A",{id:!0,class:!0,href:!0});var N$=r(Vn);Pc=s(N$,"SPAN",{});var D$=r(Pc);y(Ir.$$.fragment,D$),D$.forEach(t),N$.forEach(t),My=p(Qh),Sc=s(Qh,"SPAN",{});var L$=r(Sc);zy=d(L$,"FlaxMBartForConditionalGeneration"),L$.forEach(t),Qh.forEach(t),qu=p(o),V=s(o,"DIV",{class:!0});var ye=r(V);y(Nr.$$.fragment,ye),Fy=p(ye),Dr=s(ye,"P",{});var Hh=r(Dr);qy=d(Hh,`The MMBart Model with a language modeling head. Can be used for summarization.
This model inherits from `),rd=s(Hh,"A",{href:!0});var G$=r(rd);jy=d(G$,"FlaxPreTrainedModel"),G$.forEach(t),By=d(Hh,`. 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.)`),Hh.forEach(t),Ey=p(ye),Lr=s(ye,"P",{});var Vh=r(Lr);Cy=d(Vh,`This model is also a Flax Linen
`),Gr=s(Vh,"A",{href:!0,rel:!0});var W$=r(Gr);Ay=d(W$,"flax.nn.Module"),W$.forEach(t),Py=d(Vh,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Vh.forEach(t),Sy=p(ye),Oc=s(ye,"P",{});var U$=r(Oc);Oy=d(U$,"Finally, this model supports inherent JAX features such as:"),U$.forEach(t),Iy=p(ye),Pt=s(ye,"UL",{});var Ba=r(Pt);Ic=s(Ba,"LI",{});var R$=r(Ic);Wr=s(R$,"A",{href:!0,rel:!0});var X$=r(Wr);Ny=d(X$,"Just-In-Time (JIT) compilation"),X$.forEach(t),R$.forEach(t),Dy=p(Ba),Nc=s(Ba,"LI",{});var Q$=r(Nc);Ur=s(Q$,"A",{href:!0,rel:!0});var H$=r(Ur);Ly=d(H$,"Automatic Differentiation"),H$.forEach(t),Q$.forEach(t),Gy=p(Ba),Dc=s(Ba,"LI",{});var V$=r(Dc);Rr=s(V$,"A",{href:!0,rel:!0});var K$=r(Rr);Wy=d(K$,"Vectorization"),K$.forEach(t),V$.forEach(t),Uy=p(Ba),Lc=s(Ba,"LI",{});var J$=r(Lc);Xr=s(J$,"A",{href:!0,rel:!0});var Z$=r(Xr);Ry=d(Z$,"Parallelization"),Z$.forEach(t),J$.forEach(t),Ba.forEach(t),Xy=p(ye),Ue=s(ye,"DIV",{class:!0});var Kt=r(Ue);y(Qr.$$.fragment,Kt),Qy=p(Kt),No=s(Kt,"P",{});var xd=r(No);Hy=d(xd,"The "),Gc=s(xd,"CODE",{});var Y$=r(Gc);Vy=d(Y$,"FlaxMBartPreTrainedModel"),Y$.forEach(t),Ky=d(xd," forward method, overrides the "),Wc=s(xd,"CODE",{});var ex=r(Wc);Jy=d(ex,"__call__"),ex.forEach(t),Zy=d(xd," special method."),xd.forEach(t),Yy=p(Kt),y(Kn.$$.fragment,Kt),eT=p(Kt),y(Jn.$$.fragment,Kt),tT=p(Kt),y(Zn.$$.fragment,Kt),Kt.forEach(t),oT=p(ye),Yn=s(ye,"DIV",{class:!0});var Kh=r(Yn);y(Hr.$$.fragment,Kh),nT=p(Kh),y(ea.$$.fragment,Kh),Kh.forEach(t),aT=p(ye),ta=s(ye,"DIV",{class:!0});var Jh=r(ta);y(Vr.$$.fragment,Jh),sT=p(Jh),y(oa.$$.fragment,Jh),Jh.forEach(t),ye.forEach(t),ju=p(o),Do=s(o,"H2",{class:!0});var Zh=r(Do);na=s(Zh,"A",{id:!0,class:!0,href:!0});var tx=r(na);Uc=s(tx,"SPAN",{});var ox=r(Uc);y(Kr.$$.fragment,ox),ox.forEach(t),tx.forEach(t),rT=p(Zh),Rc=s(Zh,"SPAN",{});var nx=r(Rc);iT=d(nx,"FlaxMBartForSequenceClassification"),nx.forEach(t),Zh.forEach(t),Bu=p(o),G=s(o,"DIV",{class:!0});var ae=r(G);y(Jr.$$.fragment,ae),dT=p(ae),Xc=s(ae,"P",{});var ax=r(Xc);lT=d(ax,`MBart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),ax.forEach(t),cT=p(ae),Zr=s(ae,"P",{});var Yh=r(Zr);pT=d(Yh,"This model inherits from "),id=s(Yh,"A",{href:!0});var sx=r(id);uT=d(sx,"FlaxPreTrainedModel"),sx.forEach(t),hT=d(Yh,`. 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.)`),Yh.forEach(t),mT=p(ae),Yr=s(ae,"P",{});var em=r(Yr);fT=d(em,`This model is also a Flax Linen
`),ei=s(em,"A",{href:!0,rel:!0});var rx=r(ei);_T=d(rx,"flax.nn.Module"),rx.forEach(t),gT=d(em,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),em.forEach(t),kT=p(ae),Qc=s(ae,"P",{});var ix=r(Qc);bT=d(ix,"Finally, this model supports inherent JAX features such as:"),ix.forEach(t),vT=p(ae),St=s(ae,"UL",{});var Ea=r(St);Hc=s(Ea,"LI",{});var dx=r(Hc);ti=s(dx,"A",{href:!0,rel:!0});var lx=r(ti);yT=d(lx,"Just-In-Time (JIT) compilation"),lx.forEach(t),dx.forEach(t),TT=p(Ea),Vc=s(Ea,"LI",{});var cx=r(Vc);oi=s(cx,"A",{href:!0,rel:!0});var px=r(oi);wT=d(px,"Automatic Differentiation"),px.forEach(t),cx.forEach(t),$T=p(Ea),Kc=s(Ea,"LI",{});var ux=r(Kc);ni=s(ux,"A",{href:!0,rel:!0});var hx=r(ni);xT=d(hx,"Vectorization"),hx.forEach(t),ux.forEach(t),MT=p(Ea),Jc=s(Ea,"LI",{});var mx=r(Jc);ai=s(mx,"A",{href:!0,rel:!0});var fx=r(ai);zT=d(fx,"Parallelization"),fx.forEach(t),mx.forEach(t),Ea.forEach(t),FT=p(ae),ht=s(ae,"DIV",{class:!0});var Ca=r(ht);y(si.$$.fragment,Ca),qT=p(Ca),Lo=s(Ca,"P",{});var Md=r(Lo);jT=d(Md,"The "),Zc=s(Md,"CODE",{});var _x=r(Zc);BT=d(_x,"FlaxMBartPreTrainedModel"),_x.forEach(t),ET=d(Md," forward method, overrides the "),Yc=s(Md,"CODE",{});var gx=r(Yc);CT=d(gx,"__call__"),gx.forEach(t),AT=d(Md," special method."),Md.forEach(t),PT=p(Ca),y(aa.$$.fragment,Ca),ST=p(Ca),y(sa.$$.fragment,Ca),Ca.forEach(t),OT=p(ae),ra=s(ae,"DIV",{class:!0});var tm=r(ra);y(ri.$$.fragment,tm),IT=p(tm),y(ia.$$.fragment,tm),tm.forEach(t),NT=p(ae),da=s(ae,"DIV",{class:!0});var om=r(da);y(ii.$$.fragment,om),DT=p(om),y(la.$$.fragment,om),om.forEach(t),ae.forEach(t),Eu=p(o),Go=s(o,"H2",{class:!0});var nm=r(Go);ca=s(nm,"A",{id:!0,class:!0,href:!0});var kx=r(ca);ep=s(kx,"SPAN",{});var bx=r(ep);y(di.$$.fragment,bx),bx.forEach(t),kx.forEach(t),LT=p(nm),tp=s(nm,"SPAN",{});var vx=r(tp);GT=d(vx,"FlaxMBartForQuestionAnswering"),vx.forEach(t),nm.forEach(t),Cu=p(o),W=s(o,"DIV",{class:!0});var se=r(W);y(li.$$.fragment,se),WT=p(se),Wo=s(se,"P",{});var zd=r(Wo);UT=d(zd,`MBart 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 `),op=s(zd,"CODE",{});var yx=r(op);RT=d(yx,"span start logits"),yx.forEach(t),XT=d(zd," and "),np=s(zd,"CODE",{});var Tx=r(np);QT=d(Tx,"span end logits"),Tx.forEach(t),HT=d(zd,")."),zd.forEach(t),VT=p(se),ci=s(se,"P",{});var am=r(ci);KT=d(am,"This model inherits from "),dd=s(am,"A",{href:!0});var wx=r(dd);JT=d(wx,"FlaxPreTrainedModel"),wx.forEach(t),ZT=d(am,`. 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.)`),am.forEach(t),YT=p(se),pi=s(se,"P",{});var sm=r(pi);e2=d(sm,`This model is also a Flax Linen
`),ui=s(sm,"A",{href:!0,rel:!0});var $x=r(ui);t2=d($x,"flax.nn.Module"),$x.forEach(t),o2=d(sm,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),sm.forEach(t),n2=p(se),ap=s(se,"P",{});var xx=r(ap);a2=d(xx,"Finally, this model supports inherent JAX features such as:"),xx.forEach(t),s2=p(se),Ot=s(se,"UL",{});var Aa=r(Ot);sp=s(Aa,"LI",{});var Mx=r(sp);hi=s(Mx,"A",{href:!0,rel:!0});var zx=r(hi);r2=d(zx,"Just-In-Time (JIT) compilation"),zx.forEach(t),Mx.forEach(t),i2=p(Aa),rp=s(Aa,"LI",{});var Fx=r(rp);mi=s(Fx,"A",{href:!0,rel:!0});var qx=r(mi);d2=d(qx,"Automatic Differentiation"),qx.forEach(t),Fx.forEach(t),l2=p(Aa),ip=s(Aa,"LI",{});var jx=r(ip);fi=s(jx,"A",{href:!0,rel:!0});var Bx=r(fi);c2=d(Bx,"Vectorization"),Bx.forEach(t),jx.forEach(t),p2=p(Aa),dp=s(Aa,"LI",{});var Ex=r(dp);_i=s(Ex,"A",{href:!0,rel:!0});var Cx=r(_i);u2=d(Cx,"Parallelization"),Cx.forEach(t),Ex.forEach(t),Aa.forEach(t),h2=p(se),mt=s(se,"DIV",{class:!0});var Pa=r(mt);y(gi.$$.fragment,Pa),m2=p(Pa),Uo=s(Pa,"P",{});var Fd=r(Uo);f2=d(Fd,"The "),lp=s(Fd,"CODE",{});var Ax=r(lp);_2=d(Ax,"FlaxMBartPreTrainedModel"),Ax.forEach(t),g2=d(Fd," forward method, overrides the "),cp=s(Fd,"CODE",{});var Px=r(cp);k2=d(Px,"__call__"),Px.forEach(t),b2=d(Fd," special method."),Fd.forEach(t),v2=p(Pa),y(pa.$$.fragment,Pa),y2=p(Pa),y(ua.$$.fragment,Pa),Pa.forEach(t),T2=p(se),ha=s(se,"DIV",{class:!0});var rm=r(ha);y(ki.$$.fragment,rm),w2=p(rm),y(ma.$$.fragment,rm),rm.forEach(t),$2=p(se),fa=s(se,"DIV",{class:!0});var im=r(fa);y(bi.$$.fragment,im),x2=p(im),y(_a.$$.fragment,im),im.forEach(t),se.forEach(t),this.h()},h(){m(l,"name","hf:doc:metadata"),m(l,"content",JSON.stringify(q1)),m(h,"id","mbart-and-mbart50"),m(h,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(h,"href","#mbart-and-mbart50"),m(f,"class","relative group"),m(he,"alt","Models"),Sx(he.src,j="https://img.shields.io/badge/All_model_pages-mbart-blueviolet")||m(he,"src",j),m(Se,"href","https://huggingface.co/models?filter=mbart"),m(Oe,"alt","Spaces"),Sx(Oe.src,Nt="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||m(Oe,"src",Nt),m(ee,"href","https://huggingface.co/spaces/docs-demos/mbart-large-50-one-to-many-mmt"),m(X,"class","flex flex-wrap space-x-1"),m(we,"href","https://github.com/huggingface/transformers/issues/new?assignees=&labels=&template=bug-report.md&title"),m(we,"rel","nofollow"),m(fe,"id","overview-of-mbart"),m(fe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(fe,"href","#overview-of-mbart"),m(Q,"class","relative group"),m(J,"href","https://arxiv.org/abs/2001.08210"),m(J,"rel","nofollow"),m(ze,"href","https://huggingface.co/valhalla"),m(ze,"rel","nofollow"),m(Fe,"href","https://github.com/pytorch/fairseq/tree/master/examples/mbart"),m(Fe,"rel","nofollow"),m(S,"id","training-of-mbart"),m(S,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(S,"href","#training-of-mbart"),m(Z,"class","relative group"),m(je,"href","/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__"),m(Xo,"id","overview-of-mbart50"),m(Xo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Xo,"href","#overview-of-mbart50"),m(ro,"class","relative group"),m(Da,"href","https://arxiv.org/abs/2008.00401"),m(Da,"rel","nofollow"),m(Qo,"id","training-of-mbart50"),m(Qo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Qo,"href","#training-of-mbart50"),m(io,"class","relative group"),m(ji,"href","/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBart50Tokenizer"),m(Vo,"id","documentation-resources"),m(Vo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Vo,"href","#documentation-resources"),m(lo,"class","relative group"),m(Ci,"href","../tasks/sequence_classification"),m(Ai,"href","../tasks/question_answering"),m(Pi,"href","../tasks/language_modeling"),m(Si,"href","../tasks/masked_language_modeling"),m(Oi,"href","../tasks/translation"),m(Ii,"href","../tasks/summarization"),m(Ko,"id","transformers.MBartConfig"),m(Ko,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Ko,"href","#transformers.MBartConfig"),m(co,"class","relative group"),m(Ni,"href","/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartModel"),m(Ha,"href","https://huggingface.co/facebook/mbart-large-cc25"),m(Ha,"rel","nofollow"),m(Di,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),m(Li,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),m(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Zo,"id","transformers.MBartTokenizer"),m(Zo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Zo,"href","#transformers.MBartTokenizer"),m(ho,"class","relative group"),m(Gi,"href","/docs/transformers/v4.29.0/en/model_doc/roberta#transformers.RobertaTokenizer"),m(Wi,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetTokenizer"),m(Ja,"href","https://github.com/google/sentencepiece"),m(Ja,"rel","nofollow"),m(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(en,"id","transformers.MBartTokenizerFast"),m(en,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(en,"href","#transformers.MBartTokenizerFast"),m(fo,"class","relative group"),m(ss,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=BPE#models"),m(ss,"rel","nofollow"),m(Ui,"href","/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),m(Ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(on,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(nn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(an,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(sn,"id","transformers.MBart50Tokenizer"),m(sn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(sn,"href","#transformers.MBart50Tokenizer"),m(ko,"class","relative group"),m(ks,"href","https://github.com/google/sentencepiece"),m(ks,"rel","nofollow"),m(Ri,"href","/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),m(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(dn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ln,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(cn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(pn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(un,"id","transformers.MBart50TokenizerFast"),m(un,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(un,"href","#transformers.MBart50TokenizerFast"),m(bo,"class","relative group"),m(Es,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=BPE#models"),m(Es,"rel","nofollow"),m(Xi,"href","/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),m(De,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(mn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(fn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(_n,"id","transformers.MBartModel"),m(_n,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(_n,"href","#transformers.MBartModel"),m(yo,"class","relative group"),m(Qi,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),m(Rs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Rs,"rel","nofollow"),m(Hi,"href","/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartModel"),m(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(bn,"id","transformers.MBartForConditionalGeneration"),m(bn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(bn,"href","#transformers.MBartForConditionalGeneration"),m(wo,"class","relative group"),m(Vi,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),m(Js,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Js,"rel","nofollow"),m(Ki,"href","/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartForConditionalGeneration"),m(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(wn,"id","transformers.MBartForQuestionAnswering"),m(wn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(wn,"href","#transformers.MBartForQuestionAnswering"),m(xo,"class","relative group"),m(Ji,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),m(nr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(nr,"rel","nofollow"),m(Zi,"href","/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartForQuestionAnswering"),m(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Mn,"id","transformers.MBartForSequenceClassification"),m(Mn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Mn,"href","#transformers.MBartForSequenceClassification"),m(Fo,"class","relative group"),m(Yi,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),m(lr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(lr,"rel","nofollow"),m(ed,"href","/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.MBartForSequenceClassification"),m(Ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(jn,"id","transformers.MBartForCausalLM"),m(jn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(jn,"href","#transformers.MBartForCausalLM"),m(jo,"class","relative group"),m(Bn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Bo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Cn,"id","transformers.TFMBartModel"),m(Cn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Cn,"href","#transformers.TFMBartModel"),m(Eo,"class","relative group"),m(td,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),m(kr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(kr,"rel","nofollow"),m(od,"href","/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.TFMBartModel"),m(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(On,"id","transformers.TFMBartForConditionalGeneration"),m(On,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(On,"href","#transformers.TFMBartForConditionalGeneration"),m(Ao,"class","relative group"),m(nd,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),m($r,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m($r,"rel","nofollow"),m(ad,"href","/docs/transformers/v4.29.0/en/model_doc/mbart#transformers.TFMBartForConditionalGeneration"),m(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Gn,"id","transformers.FlaxMBartModel"),m(Gn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Gn,"href","#transformers.FlaxMBartModel"),m(So,"class","relative group"),m(sd,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(jr,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(jr,"rel","nofollow"),m(Br,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(Br,"rel","nofollow"),m(Er,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(Er,"rel","nofollow"),m(Cr,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(Cr,"rel","nofollow"),m(Ar,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(Ar,"rel","nofollow"),m(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Rn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Qn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Vn,"id","transformers.FlaxMBartForConditionalGeneration"),m(Vn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Vn,"href","#transformers.FlaxMBartForConditionalGeneration"),m(Io,"class","relative group"),m(rd,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Gr,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(Gr,"rel","nofollow"),m(Wr,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(Wr,"rel","nofollow"),m(Ur,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(Ur,"rel","nofollow"),m(Rr,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(Rr,"rel","nofollow"),m(Xr,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(Xr,"rel","nofollow"),m(Ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Yn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ta,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(na,"id","transformers.FlaxMBartForSequenceClassification"),m(na,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(na,"href","#transformers.FlaxMBartForSequenceClassification"),m(Do,"class","relative group"),m(id,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(ei,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(ei,"rel","nofollow"),m(ti,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(ti,"rel","nofollow"),m(oi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(oi,"rel","nofollow"),m(ni,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(ni,"rel","nofollow"),m(ai,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(ai,"rel","nofollow"),m(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ra,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(da,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ca,"id","transformers.FlaxMBartForQuestionAnswering"),m(ca,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(ca,"href","#transformers.FlaxMBartForQuestionAnswering"),m(Go,"class","relative group"),m(dd,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(ui,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(ui,"rel","nofollow"),m(hi,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(hi,"rel","nofollow"),m(mi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(mi,"rel","nofollow"),m(fi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(fi,"rel","nofollow"),m(_i,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(_i,"rel","nofollow"),m(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ha,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(fa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,_){e(document.head,l),g(o,b,_),g(o,f,_),e(f,h),e(h,k),T(n,k,null),e(f,u),e(f,q),e(q,bt),g(o,ot,_),g(o,X,_),e(X,Se),e(Se,he),e(X,vt),e(X,ee),e(ee,Oe),g(o,me,_),g(o,re,_),e(re,Xe),e(Xe,Te),e(re,yt),e(re,we),e(we,$e),e(re,Tt),g(o,nt,_),g(o,Q,_),e(Q,fe),e(fe,Qe),T(ie,Qe,null),e(Q,O),e(Q,I),e(I,wt),g(o,_e,_),g(o,ge,_),e(ge,$t),e(ge,J),e(J,xt),e(ge,Mt),g(o,U,_),g(o,Ie,_),e(Ie,xe),g(o,at,_),g(o,de,_),e(de,Me),e(de,ze),e(ze,zt),e(de,le),e(de,Fe),e(Fe,qe),g(o,st,_),g(o,Z,_),e(Z,S),e(S,He),T(N,He,null),e(Z,Ft),e(Z,Ve),e(Ve,z),g(o,B,_),g(o,K,_),e(K,Ke),e(K,qt),e(qt,Jt),e(K,C),e(K,jt),e(jt,Zt),e(K,Yt),e(K,Bt),e(Bt,eo),e(K,ce),e(K,pe),e(pe,to),e(K,oo),g(o,ke,_),g(o,te,_),e(te,no),e(te,je),e(je,Et),e(Et,Je),e(je,ao),e(te,dm),e(te,qd),e(qd,lm),e(te,cm),e(te,jd),e(jd,pm),e(te,um),g(o,Np,_),g(o,Mi,_),e(Mi,Bd),e(Bd,hm),g(o,Dp,_),T(Sa,o,_),g(o,Lp,_),g(o,zi,_),e(zi,Oa),e(Oa,Ed),e(Ed,mm),e(Oa,fm),e(Oa,so),e(so,_m),e(so,Cd),e(Cd,gm),e(so,km),e(so,Ad),e(Ad,bm),e(so,vm),g(o,Gp,_),T(Ia,o,_),g(o,Wp,_),g(o,ro,_),e(ro,Xo),e(Xo,Pd),T(Na,Pd,null),e(ro,ym),e(ro,Sd),e(Sd,Tm),g(o,Up,_),g(o,Dt,_),e(Dt,wm),e(Dt,Da),e(Da,$m),e(Dt,xm),e(Dt,Od),e(Od,Mm),e(Dt,zm),g(o,Rp,_),g(o,Fi,_),e(Fi,Fm),g(o,Xp,_),g(o,qi,_),e(qi,Id),e(Id,qm),g(o,Qp,_),g(o,io,_),e(io,Qo),e(Qo,Nd),T(La,Nd,null),e(io,jm),e(io,Dd),e(Dd,Bm),g(o,Hp,_),g(o,rt,_),e(rt,Em),e(rt,Ld),e(Ld,Cm),e(rt,Am),e(rt,Gd),e(Gd,Pm),e(rt,Sm),e(rt,Wd),e(Wd,Om),e(rt,Im),g(o,Vp,_),g(o,Ho,_),e(Ho,Nm),e(Ho,ji),e(ji,Dm),e(Ho,Lm),g(o,Kp,_),g(o,Bi,_),e(Bi,Ud),e(Ud,Gm),g(o,Jp,_),T(Ga,o,_),g(o,Zp,_),g(o,Ei,_),e(Ei,Wa),e(Wa,Rd),e(Rd,Wm),e(Wa,Um),e(Wa,Be),e(Be,Rm),e(Be,Xd),e(Xd,Xm),e(Be,Qm),e(Be,Qd),e(Qd,Hm),e(Be,Vm),e(Be,Hd),e(Hd,Km),e(Be,Jm),e(Be,Vd),e(Vd,Zm),e(Be,Ym),e(Be,Kd),e(Kd,ef),e(Be,tf),g(o,Yp,_),T(Ua,o,_),g(o,eu,_),g(o,lo,_),e(lo,Vo),e(Vo,Jd),T(Ra,Jd,null),e(lo,of),e(lo,Zd),e(Zd,nf),g(o,tu,_),g(o,be,_),e(be,Yd),e(Yd,Ci),e(Ci,af),e(be,sf),e(be,el),e(el,Ai),e(Ai,rf),e(be,df),e(be,tl),e(tl,Pi),e(Pi,lf),e(be,cf),e(be,ol),e(ol,Si),e(Si,pf),e(be,uf),e(be,nl),e(nl,Oi),e(Oi,hf),e(be,mf),e(be,al),e(al,Ii),e(Ii,ff),g(o,ou,_),g(o,co,_),e(co,Ko),e(Ko,sl),T(Xa,sl,null),e(co,_f),e(co,rl),e(rl,gf),g(o,nu,_),g(o,Ze,_),T(Qa,Ze,null),e(Ze,kf),e(Ze,po),e(po,bf),e(po,Ni),e(Ni,vf),e(po,yf),e(po,Ha),e(Ha,Tf),e(po,wf),e(Ze,$f),e(Ze,uo),e(uo,xf),e(uo,Di),e(Di,Mf),e(uo,zf),e(uo,Li),e(Li,Ff),e(uo,qf),e(Ze,jf),T(Jo,Ze,null),g(o,au,_),g(o,ho,_),e(ho,Zo),e(Zo,il),T(Va,il,null),e(ho,Bf),e(ho,dl),e(dl,Ef),g(o,su,_),g(o,ue,_),T(Ka,ue,null),e(ue,Cf),e(ue,ll),e(ll,Af),e(ue,Pf),e(ue,Ct),e(Ct,Sf),e(Ct,Gi),e(Gi,Of),e(Ct,If),e(Ct,Wi),e(Wi,Nf),e(Ct,Df),e(Ct,Ja),e(Ja,Lf),e(Ct,Gf),e(ue,Wf),e(ue,mo),e(mo,Uf),e(mo,cl),e(cl,Rf),e(mo,Xf),e(mo,pl),e(pl,Qf),e(mo,Hf),e(ue,Vf),T(Yo,ue,null),e(ue,Kf),e(ue,it),T(Za,it,null),e(it,Jf),e(it,Ya),e(Ya,Zf),e(Ya,ul),e(ul,Yf),e(Ya,e_),e(it,t_),e(it,es),e(es,ts),e(ts,hl),e(hl,o_),e(ts,n_),e(ts,ml),e(ml,a_),e(es,s_),e(es,os),e(os,fl),e(fl,r_),e(os,i_),e(os,_l),e(_l,d_),e(it,l_),e(it,gl),e(gl,c_),g(o,ru,_),g(o,fo,_),e(fo,en),e(en,kl),T(ns,kl,null),e(fo,p_),e(fo,bl),e(bl,u_),g(o,iu,_),g(o,D,_),T(as,D,null),e(D,h_),e(D,_o),e(_o,m_),e(_o,vl),e(vl,f_),e(_o,__),e(_o,ss),e(ss,g_),e(_o,k_),e(D,b_),e(D,rs),e(rs,v_),e(rs,Ui),e(Ui,y_),e(rs,T_),e(D,w_),e(D,go),e(go,$_),e(go,yl),e(yl,x_),e(go,M_),e(go,Tl),e(Tl,z_),e(go,F_),e(D,q_),T(tn,D,null),e(D,j_),e(D,Ne),T(is,Ne,null),e(Ne,B_),e(Ne,wl),e(wl,E_),e(Ne,C_),e(Ne,ds),e(ds,A_),e(ds,$l),e($l,P_),e(ds,S_),e(Ne,O_),e(Ne,ls),e(ls,cs),e(cs,xl),e(xl,I_),e(cs,N_),e(cs,Ml),e(Ml,D_),e(ls,L_),e(ls,ps),e(ps,zl),e(zl,G_),e(ps,W_),e(ps,Fl),e(Fl,U_),e(Ne,R_),e(Ne,ql),e(ql,X_),e(D,Q_),e(D,on),T(us,on,null),e(on,H_),e(on,jl),e(jl,V_),e(D,K_),e(D,nn),T(hs,nn,null),e(nn,J_),e(nn,Bl),e(Bl,Z_),e(D,Y_),e(D,an),T(ms,an,null),e(an,eg),e(an,El),e(El,tg),g(o,du,_),g(o,ko,_),e(ko,sn),e(sn,Cl),T(fs,Cl,null),e(ko,og),e(ko,Al),e(Al,ng),g(o,lu,_),g(o,L,_),T(_s,L,null),e(L,ag),e(L,gs),e(gs,sg),e(gs,ks),e(ks,rg),e(gs,ig),e(L,dg),e(L,bs),e(bs,lg),e(bs,Ri),e(Ri,cg),e(bs,pg),e(L,ug),T(rn,L,null),e(L,hg),e(L,dt),T(vs,dt,null),e(dt,mg),e(dt,ys),e(ys,fg),e(ys,Pl),e(Pl,_g),e(ys,gg),e(dt,kg),e(dt,Ts),e(Ts,ws),e(ws,Sl),e(Sl,bg),e(ws,vg),e(ws,Ol),e(Ol,yg),e(Ts,Tg),e(Ts,$s),e($s,Il),e(Il,wg),e($s,$g),e($s,Nl),e(Nl,xg),e(dt,Mg),e(dt,Dl),e(Dl,zg),e(L,Fg),e(L,dn),T(xs,dn,null),e(dn,qg),e(dn,Ll),e(Ll,jg),e(L,Bg),e(L,ln),T(Ms,ln,null),e(ln,Eg),e(ln,zs),e(zs,Cg),e(zs,Gl),e(Gl,Ag),e(zs,Pg),e(L,Sg),e(L,cn),T(Fs,cn,null),e(cn,Og),e(cn,Wl),e(Wl,Ig),e(L,Ng),e(L,pn),T(qs,pn,null),e(pn,Dg),e(pn,Ul),e(Ul,Lg),g(o,cu,_),g(o,bo,_),e(bo,un),e(un,Rl),T(js,Rl,null),e(bo,Gg),e(bo,Xl),e(Xl,Wg),g(o,pu,_),g(o,Y,_),T(Bs,Y,null),e(Y,Ug),e(Y,vo),e(vo,Rg),e(vo,Ql),e(Ql,Xg),e(vo,Qg),e(vo,Es),e(Es,Hg),e(vo,Vg),e(Y,Kg),e(Y,Cs),e(Cs,Jg),e(Cs,Xi),e(Xi,Zg),e(Cs,Yg),e(Y,ek),T(hn,Y,null),e(Y,tk),e(Y,De),T(As,De,null),e(De,ok),e(De,Hl),e(Hl,nk),e(De,ak),e(De,Ps),e(Ps,sk),e(Ps,Vl),e(Vl,rk),e(Ps,ik),e(De,dk),e(De,Ss),e(Ss,Os),e(Os,Kl),e(Kl,lk),e(Os,ck),e(Os,Jl),e(Jl,pk),e(Ss,uk),e(Ss,Is),e(Is,Zl),e(Zl,hk),e(Is,mk),e(Is,Yl),e(Yl,fk),e(De,_k),e(De,ec),e(ec,gk),e(Y,kk),e(Y,mn),T(Ns,mn,null),e(mn,bk),e(mn,tc),e(tc,vk),e(Y,yk),e(Y,fn),T(Ds,fn,null),e(fn,Tk),e(fn,oc),e(oc,wk),g(o,uu,_),g(o,yo,_),e(yo,_n),e(_n,nc),T(Ls,nc,null),e(yo,$k),e(yo,ac),e(ac,xk),g(o,hu,_),g(o,Ye,_),T(Gs,Ye,null),e(Ye,Mk),e(Ye,Ws),e(Ws,zk),e(Ws,Qi),e(Qi,Fk),e(Ws,qk),e(Ye,jk),e(Ye,Us),e(Us,Bk),e(Us,Rs),e(Rs,Ek),e(Us,Ck),e(Ye,Ak),e(Ye,lt),T(Xs,lt,null),e(lt,Pk),e(lt,To),e(To,Sk),e(To,Hi),e(Hi,Ok),e(To,Ik),e(To,sc),e(sc,Nk),e(To,Dk),e(lt,Lk),T(gn,lt,null),e(lt,Gk),T(kn,lt,null),g(o,mu,_),g(o,wo,_),e(wo,bn),e(bn,rc),T(Qs,rc,null),e(wo,Wk),e(wo,ic),e(ic,Uk),g(o,fu,_),g(o,et,_),T(Hs,et,null),e(et,Rk),e(et,Vs),e(Vs,Xk),e(Vs,Vi),e(Vi,Qk),e(Vs,Hk),e(et,Vk),e(et,Ks),e(Ks,Kk),e(Ks,Js),e(Js,Jk),e(Ks,Zk),e(et,Yk),e(et,Le),T(Zs,Le,null),e(Le,eb),e(Le,$o),e($o,tb),e($o,Ki),e(Ki,ob),e($o,nb),e($o,dc),e(dc,ab),e($o,sb),e(Le,rb),T(vn,Le,null),e(Le,ib),T(yn,Le,null),e(Le,db),T(Tn,Le,null),g(o,_u,_),g(o,xo,_),e(xo,wn),e(wn,lc),T(Ys,lc,null),e(xo,lb),e(xo,cc),e(cc,cb),g(o,gu,_),g(o,Ee,_),T(er,Ee,null),e(Ee,pb),e(Ee,Mo),e(Mo,ub),e(Mo,pc),e(pc,hb),e(Mo,mb),e(Mo,uc),e(uc,fb),e(Mo,_b),e(Ee,gb),e(Ee,tr),e(tr,kb),e(tr,Ji),e(Ji,bb),e(tr,vb),e(Ee,yb),e(Ee,or),e(or,Tb),e(or,nr),e(nr,wb),e(or,$b),e(Ee,xb),e(Ee,ct),T(ar,ct,null),e(ct,Mb),e(ct,zo),e(zo,zb),e(zo,Zi),e(Zi,Fb),e(zo,qb),e(zo,hc),e(hc,jb),e(zo,Bb),e(ct,Eb),T($n,ct,null),e(ct,Cb),T(xn,ct,null),g(o,ku,_),g(o,Fo,_),e(Fo,Mn),e(Mn,mc),T(sr,mc,null),e(Fo,Ab),e(Fo,fc),e(fc,Pb),g(o,bu,_),g(o,Ce,_),T(rr,Ce,null),e(Ce,Sb),e(Ce,_c),e(_c,Ob),e(Ce,Ib),e(Ce,ir),e(ir,Nb),e(ir,Yi),e(Yi,Db),e(ir,Lb),e(Ce,Gb),e(Ce,dr),e(dr,Wb),e(dr,lr),e(lr,Ub),e(dr,Rb),e(Ce,Xb),e(Ce,Ge),T(cr,Ge,null),e(Ge,Qb),e(Ge,qo),e(qo,Hb),e(qo,ed),e(ed,Vb),e(qo,Kb),e(qo,gc),e(gc,Jb),e(qo,Zb),e(Ge,Yb),T(zn,Ge,null),e(Ge,ev),T(Fn,Ge,null),e(Ge,tv),T(qn,Ge,null),g(o,vu,_),g(o,jo,_),e(jo,jn),e(jn,kc),T(pr,kc,null),e(jo,ov),e(jo,bc),e(bc,nv),g(o,yu,_),g(o,Bo,_),T(ur,Bo,null),e(Bo,av),e(Bo,Bn),T(hr,Bn,null),e(Bn,sv),T(En,Bn,null),g(o,Tu,_),g(o,Eo,_),e(Eo,Cn),e(Cn,vc),T(mr,vc,null),e(Eo,rv),e(Eo,yc),e(yc,iv),g(o,wu,_),g(o,Ae,_),T(fr,Ae,null),e(Ae,dv),e(Ae,_r),e(_r,lv),e(_r,td),e(td,cv),e(_r,pv),e(Ae,uv),e(Ae,gr),e(gr,hv),e(gr,kr),e(kr,mv),e(gr,fv),e(Ae,_v),T(An,Ae,null),e(Ae,gv),e(Ae,pt),T(br,pt,null),e(pt,kv),e(pt,Co),e(Co,bv),e(Co,od),e(od,vv),e(Co,yv),e(Co,Tc),e(Tc,Tv),e(Co,wv),e(pt,$v),T(Pn,pt,null),e(pt,xv),T(Sn,pt,null),g(o,$u,_),g(o,Ao,_),e(Ao,On),e(On,wc),T(vr,wc,null),e(Ao,Mv),e(Ao,$c),e($c,zv),g(o,xu,_),g(o,Pe,_),T(yr,Pe,null),e(Pe,Fv),e(Pe,Tr),e(Tr,qv),e(Tr,nd),e(nd,jv),e(Tr,Bv),e(Pe,Ev),e(Pe,wr),e(wr,Cv),e(wr,$r),e($r,Av),e(wr,Pv),e(Pe,Sv),T(In,Pe,null),e(Pe,Ov),e(Pe,We),T(xr,We,null),e(We,Iv),e(We,Po),e(Po,Nv),e(Po,ad),e(ad,Dv),e(Po,Lv),e(Po,xc),e(xc,Gv),e(Po,Wv),e(We,Uv),T(Nn,We,null),e(We,Rv),T(Dn,We,null),e(We,Xv),T(Ln,We,null),g(o,Mu,_),g(o,So,_),e(So,Gn),e(Gn,Mc),T(Mr,Mc,null),e(So,Qv),e(So,zc),e(zc,Hv),g(o,zu,_),g(o,H,_),T(zr,H,null),e(H,Vv),e(H,Fr),e(Fr,Kv),e(Fr,sd),e(sd,Jv),e(Fr,Zv),e(H,Yv),e(H,qr),e(qr,ey),e(qr,jr),e(jr,ty),e(qr,oy),e(H,ny),e(H,Fc),e(Fc,ay),e(H,sy),e(H,At),e(At,qc),e(qc,Br),e(Br,ry),e(At,iy),e(At,jc),e(jc,Er),e(Er,dy),e(At,ly),e(At,Bc),e(Bc,Cr),e(Cr,cy),e(At,py),e(At,Ec),e(Ec,Ar),e(Ar,uy),e(H,hy),e(H,ut),T(Pr,ut,null),e(ut,my),e(ut,Oo),e(Oo,fy),e(Oo,Cc),e(Cc,_y),e(Oo,gy),e(Oo,Ac),e(Ac,ky),e(Oo,by),e(ut,vy),T(Wn,ut,null),e(ut,yy),T(Un,ut,null),e(H,Ty),e(H,Rn),T(Sr,Rn,null),e(Rn,wy),T(Xn,Rn,null),e(H,$y),e(H,Qn),T(Or,Qn,null),e(Qn,xy),T(Hn,Qn,null),g(o,Fu,_),g(o,Io,_),e(Io,Vn),e(Vn,Pc),T(Ir,Pc,null),e(Io,My),e(Io,Sc),e(Sc,zy),g(o,qu,_),g(o,V,_),T(Nr,V,null),e(V,Fy),e(V,Dr),e(Dr,qy),e(Dr,rd),e(rd,jy),e(Dr,By),e(V,Ey),e(V,Lr),e(Lr,Cy),e(Lr,Gr),e(Gr,Ay),e(Lr,Py),e(V,Sy),e(V,Oc),e(Oc,Oy),e(V,Iy),e(V,Pt),e(Pt,Ic),e(Ic,Wr),e(Wr,Ny),e(Pt,Dy),e(Pt,Nc),e(Nc,Ur),e(Ur,Ly),e(Pt,Gy),e(Pt,Dc),e(Dc,Rr),e(Rr,Wy),e(Pt,Uy),e(Pt,Lc),e(Lc,Xr),e(Xr,Ry),e(V,Xy),e(V,Ue),T(Qr,Ue,null),e(Ue,Qy),e(Ue,No),e(No,Hy),e(No,Gc),e(Gc,Vy),e(No,Ky),e(No,Wc),e(Wc,Jy),e(No,Zy),e(Ue,Yy),T(Kn,Ue,null),e(Ue,eT),T(Jn,Ue,null),e(Ue,tT),T(Zn,Ue,null),e(V,oT),e(V,Yn),T(Hr,Yn,null),e(Yn,nT),T(ea,Yn,null),e(V,aT),e(V,ta),T(Vr,ta,null),e(ta,sT),T(oa,ta,null),g(o,ju,_),g(o,Do,_),e(Do,na),e(na,Uc),T(Kr,Uc,null),e(Do,rT),e(Do,Rc),e(Rc,iT),g(o,Bu,_),g(o,G,_),T(Jr,G,null),e(G,dT),e(G,Xc),e(Xc,lT),e(G,cT),e(G,Zr),e(Zr,pT),e(Zr,id),e(id,uT),e(Zr,hT),e(G,mT),e(G,Yr),e(Yr,fT),e(Yr,ei),e(ei,_T),e(Yr,gT),e(G,kT),e(G,Qc),e(Qc,bT),e(G,vT),e(G,St),e(St,Hc),e(Hc,ti),e(ti,yT),e(St,TT),e(St,Vc),e(Vc,oi),e(oi,wT),e(St,$T),e(St,Kc),e(Kc,ni),e(ni,xT),e(St,MT),e(St,Jc),e(Jc,ai),e(ai,zT),e(G,FT),e(G,ht),T(si,ht,null),e(ht,qT),e(ht,Lo),e(Lo,jT),e(Lo,Zc),e(Zc,BT),e(Lo,ET),e(Lo,Yc),e(Yc,CT),e(Lo,AT),e(ht,PT),T(aa,ht,null),e(ht,ST),T(sa,ht,null),e(G,OT),e(G,ra),T(ri,ra,null),e(ra,IT),T(ia,ra,null),e(G,NT),e(G,da),T(ii,da,null),e(da,DT),T(la,da,null),g(o,Eu,_),g(o,Go,_),e(Go,ca),e(ca,ep),T(di,ep,null),e(Go,LT),e(Go,tp),e(tp,GT),g(o,Cu,_),g(o,W,_),T(li,W,null),e(W,WT),e(W,Wo),e(Wo,UT),e(Wo,op),e(op,RT),e(Wo,XT),e(Wo,np),e(np,QT),e(Wo,HT),e(W,VT),e(W,ci),e(ci,KT),e(ci,dd),e(dd,JT),e(ci,ZT),e(W,YT),e(W,pi),e(pi,e2),e(pi,ui),e(ui,t2),e(pi,o2),e(W,n2),e(W,ap),e(ap,a2),e(W,s2),e(W,Ot),e(Ot,sp),e(sp,hi),e(hi,r2),e(Ot,i2),e(Ot,rp),e(rp,mi),e(mi,d2),e(Ot,l2),e(Ot,ip),e(ip,fi),e(fi,c2),e(Ot,p2),e(Ot,dp),e(dp,_i),e(_i,u2),e(W,h2),e(W,mt),T(gi,mt,null),e(mt,m2),e(mt,Uo),e(Uo,f2),e(Uo,lp),e(lp,_2),e(Uo,g2),e(Uo,cp),e(cp,k2),e(Uo,b2),e(mt,v2),T(pa,mt,null),e(mt,y2),T(ua,mt,null),e(W,T2),e(W,ha),T(ki,ha,null),e(ha,w2),T(ma,ha,null),e(W,$2),e(W,fa),T(bi,fa,null),e(fa,x2),T(_a,fa,null),Au=!0},p(o,[_]){const vi={};_&2&&(vi.$$scope={dirty:_,ctx:o}),Jo.$set(vi);const pp={};_&2&&(pp.$$scope={dirty:_,ctx:o}),Yo.$set(pp);const up={};_&2&&(up.$$scope={dirty:_,ctx:o}),tn.$set(up);const hp={};_&2&&(hp.$$scope={dirty:_,ctx:o}),rn.$set(hp);const yi={};_&2&&(yi.$$scope={dirty:_,ctx:o}),hn.$set(yi);const mp={};_&2&&(mp.$$scope={dirty:_,ctx:o}),gn.$set(mp);const fp={};_&2&&(fp.$$scope={dirty:_,ctx:o}),kn.$set(fp);const ga={};_&2&&(ga.$$scope={dirty:_,ctx:o}),vn.$set(ga);const _p={};_&2&&(_p.$$scope={dirty:_,ctx:o}),yn.$set(_p);const gp={};_&2&&(gp.$$scope={dirty:_,ctx:o}),Tn.$set(gp);const Ti={};_&2&&(Ti.$$scope={dirty:_,ctx:o}),$n.$set(Ti);const kp={};_&2&&(kp.$$scope={dirty:_,ctx:o}),xn.$set(kp);const bp={};_&2&&(bp.$$scope={dirty:_,ctx:o}),zn.$set(bp);const vp={};_&2&&(vp.$$scope={dirty:_,ctx:o}),Fn.$set(vp);const wi={};_&2&&(wi.$$scope={dirty:_,ctx:o}),qn.$set(wi);const yp={};_&2&&(yp.$$scope={dirty:_,ctx:o}),En.$set(yp);const Tp={};_&2&&(Tp.$$scope={dirty:_,ctx:o}),An.$set(Tp);const ka={};_&2&&(ka.$$scope={dirty:_,ctx:o}),Pn.$set(ka);const wp={};_&2&&(wp.$$scope={dirty:_,ctx:o}),Sn.$set(wp);const $p={};_&2&&($p.$$scope={dirty:_,ctx:o}),In.$set($p);const $i={};_&2&&($i.$$scope={dirty:_,ctx:o}),Nn.$set($i);const xp={};_&2&&(xp.$$scope={dirty:_,ctx:o}),Dn.$set(xp);const Mp={};_&2&&(Mp.$$scope={dirty:_,ctx:o}),Ln.$set(Mp);const zp={};_&2&&(zp.$$scope={dirty:_,ctx:o}),Wn.$set(zp);const tt={};_&2&&(tt.$$scope={dirty:_,ctx:o}),Un.$set(tt);const Fp={};_&2&&(Fp.$$scope={dirty:_,ctx:o}),Xn.$set(Fp);const qp={};_&2&&(qp.$$scope={dirty:_,ctx:o}),Hn.$set(qp);const jp={};_&2&&(jp.$$scope={dirty:_,ctx:o}),Kn.$set(jp);const Bp={};_&2&&(Bp.$$scope={dirty:_,ctx:o}),Jn.$set(Bp);const It={};_&2&&(It.$$scope={dirty:_,ctx:o}),Zn.$set(It);const ld={};_&2&&(ld.$$scope={dirty:_,ctx:o}),ea.$set(ld);const Ep={};_&2&&(Ep.$$scope={dirty:_,ctx:o}),oa.$set(Ep);const Cp={};_&2&&(Cp.$$scope={dirty:_,ctx:o}),aa.$set(Cp);const Ap={};_&2&&(Ap.$$scope={dirty:_,ctx:o}),sa.$set(Ap);const Pp={};_&2&&(Pp.$$scope={dirty:_,ctx:o}),ia.$set(Pp);const Sp={};_&2&&(Sp.$$scope={dirty:_,ctx:o}),la.$set(Sp);const Op={};_&2&&(Op.$$scope={dirty:_,ctx:o}),pa.$set(Op);const xi={};_&2&&(xi.$$scope={dirty:_,ctx:o}),ua.$set(xi);const Ip={};_&2&&(Ip.$$scope={dirty:_,ctx:o}),ma.$set(Ip);const Ro={};_&2&&(Ro.$$scope={dirty:_,ctx:o}),_a.$set(Ro)},i(o){Au||(w(n.$$.fragment,o),w(ie.$$.fragment,o),w(N.$$.fragment,o),w(Sa.$$.fragment,o),w(Ia.$$.fragment,o),w(Na.$$.fragment,o),w(La.$$.fragment,o),w(Ga.$$.fragment,o),w(Ua.$$.fragment,o),w(Ra.$$.fragment,o),w(Xa.$$.fragment,o),w(Qa.$$.fragment,o),w(Jo.$$.fragment,o),w(Va.$$.fragment,o),w(Ka.$$.fragment,o),w(Yo.$$.fragment,o),w(Za.$$.fragment,o),w(ns.$$.fragment,o),w(as.$$.fragment,o),w(tn.$$.fragment,o),w(is.$$.fragment,o),w(us.$$.fragment,o),w(hs.$$.fragment,o),w(ms.$$.fragment,o),w(fs.$$.fragment,o),w(_s.$$.fragment,o),w(rn.$$.fragment,o),w(vs.$$.fragment,o),w(xs.$$.fragment,o),w(Ms.$$.fragment,o),w(Fs.$$.fragment,o),w(qs.$$.fragment,o),w(js.$$.fragment,o),w(Bs.$$.fragment,o),w(hn.$$.fragment,o),w(As.$$.fragment,o),w(Ns.$$.fragment,o),w(Ds.$$.fragment,o),w(Ls.$$.fragment,o),w(Gs.$$.fragment,o),w(Xs.$$.fragment,o),w(gn.$$.fragment,o),w(kn.$$.fragment,o),w(Qs.$$.fragment,o),w(Hs.$$.fragment,o),w(Zs.$$.fragment,o),w(vn.$$.fragment,o),w(yn.$$.fragment,o),w(Tn.$$.fragment,o),w(Ys.$$.fragment,o),w(er.$$.fragment,o),w(ar.$$.fragment,o),w($n.$$.fragment,o),w(xn.$$.fragment,o),w(sr.$$.fragment,o),w(rr.$$.fragment,o),w(cr.$$.fragment,o),w(zn.$$.fragment,o),w(Fn.$$.fragment,o),w(qn.$$.fragment,o),w(pr.$$.fragment,o),w(ur.$$.fragment,o),w(hr.$$.fragment,o),w(En.$$.fragment,o),w(mr.$$.fragment,o),w(fr.$$.fragment,o),w(An.$$.fragment,o),w(br.$$.fragment,o),w(Pn.$$.fragment,o),w(Sn.$$.fragment,o),w(vr.$$.fragment,o),w(yr.$$.fragment,o),w(In.$$.fragment,o),w(xr.$$.fragment,o),w(Nn.$$.fragment,o),w(Dn.$$.fragment,o),w(Ln.$$.fragment,o),w(Mr.$$.fragment,o),w(zr.$$.fragment,o),w(Pr.$$.fragment,o),w(Wn.$$.fragment,o),w(Un.$$.fragment,o),w(Sr.$$.fragment,o),w(Xn.$$.fragment,o),w(Or.$$.fragment,o),w(Hn.$$.fragment,o),w(Ir.$$.fragment,o),w(Nr.$$.fragment,o),w(Qr.$$.fragment,o),w(Kn.$$.fragment,o),w(Jn.$$.fragment,o),w(Zn.$$.fragment,o),w(Hr.$$.fragment,o),w(ea.$$.fragment,o),w(Vr.$$.fragment,o),w(oa.$$.fragment,o),w(Kr.$$.fragment,o),w(Jr.$$.fragment,o),w(si.$$.fragment,o),w(aa.$$.fragment,o),w(sa.$$.fragment,o),w(ri.$$.fragment,o),w(ia.$$.fragment,o),w(ii.$$.fragment,o),w(la.$$.fragment,o),w(di.$$.fragment,o),w(li.$$.fragment,o),w(gi.$$.fragment,o),w(pa.$$.fragment,o),w(ua.$$.fragment,o),w(ki.$$.fragment,o),w(ma.$$.fragment,o),w(bi.$$.fragment,o),w(_a.$$.fragment,o),Au=!0)},o(o){$(n.$$.fragment,o),$(ie.$$.fragment,o),$(N.$$.fragment,o),$(Sa.$$.fragment,o),$(Ia.$$.fragment,o),$(Na.$$.fragment,o),$(La.$$.fragment,o),$(Ga.$$.fragment,o),$(Ua.$$.fragment,o),$(Ra.$$.fragment,o),$(Xa.$$.fragment,o),$(Qa.$$.fragment,o),$(Jo.$$.fragment,o),$(Va.$$.fragment,o),$(Ka.$$.fragment,o),$(Yo.$$.fragment,o),$(Za.$$.fragment,o),$(ns.$$.fragment,o),$(as.$$.fragment,o),$(tn.$$.fragment,o),$(is.$$.fragment,o),$(us.$$.fragment,o),$(hs.$$.fragment,o),$(ms.$$.fragment,o),$(fs.$$.fragment,o),$(_s.$$.fragment,o),$(rn.$$.fragment,o),$(vs.$$.fragment,o),$(xs.$$.fragment,o),$(Ms.$$.fragment,o),$(Fs.$$.fragment,o),$(qs.$$.fragment,o),$(js.$$.fragment,o),$(Bs.$$.fragment,o),$(hn.$$.fragment,o),$(As.$$.fragment,o),$(Ns.$$.fragment,o),$(Ds.$$.fragment,o),$(Ls.$$.fragment,o),$(Gs.$$.fragment,o),$(Xs.$$.fragment,o),$(gn.$$.fragment,o),$(kn.$$.fragment,o),$(Qs.$$.fragment,o),$(Hs.$$.fragment,o),$(Zs.$$.fragment,o),$(vn.$$.fragment,o),$(yn.$$.fragment,o),$(Tn.$$.fragment,o),$(Ys.$$.fragment,o),$(er.$$.fragment,o),$(ar.$$.fragment,o),$($n.$$.fragment,o),$(xn.$$.fragment,o),$(sr.$$.fragment,o),$(rr.$$.fragment,o),$(cr.$$.fragment,o),$(zn.$$.fragment,o),$(Fn.$$.fragment,o),$(qn.$$.fragment,o),$(pr.$$.fragment,o),$(ur.$$.fragment,o),$(hr.$$.fragment,o),$(En.$$.fragment,o),$(mr.$$.fragment,o),$(fr.$$.fragment,o),$(An.$$.fragment,o),$(br.$$.fragment,o),$(Pn.$$.fragment,o),$(Sn.$$.fragment,o),$(vr.$$.fragment,o),$(yr.$$.fragment,o),$(In.$$.fragment,o),$(xr.$$.fragment,o),$(Nn.$$.fragment,o),$(Dn.$$.fragment,o),$(Ln.$$.fragment,o),$(Mr.$$.fragment,o),$(zr.$$.fragment,o),$(Pr.$$.fragment,o),$(Wn.$$.fragment,o),$(Un.$$.fragment,o),$(Sr.$$.fragment,o),$(Xn.$$.fragment,o),$(Or.$$.fragment,o),$(Hn.$$.fragment,o),$(Ir.$$.fragment,o),$(Nr.$$.fragment,o),$(Qr.$$.fragment,o),$(Kn.$$.fragment,o),$(Jn.$$.fragment,o),$(Zn.$$.fragment,o),$(Hr.$$.fragment,o),$(ea.$$.fragment,o),$(Vr.$$.fragment,o),$(oa.$$.fragment,o),$(Kr.$$.fragment,o),$(Jr.$$.fragment,o),$(si.$$.fragment,o),$(aa.$$.fragment,o),$(sa.$$.fragment,o),$(ri.$$.fragment,o),$(ia.$$.fragment,o),$(ii.$$.fragment,o),$(la.$$.fragment,o),$(di.$$.fragment,o),$(li.$$.fragment,o),$(gi.$$.fragment,o),$(pa.$$.fragment,o),$(ua.$$.fragment,o),$(ki.$$.fragment,o),$(ma.$$.fragment,o),$(bi.$$.fragment,o),$(_a.$$.fragment,o),Au=!1},d(o){t(l),o&&t(b),o&&t(f),x(n),o&&t(ot),o&&t(X),o&&t(me),o&&t(re),o&&t(nt),o&&t(Q),x(ie),o&&t(_e),o&&t(ge),o&&t(U),o&&t(Ie),o&&t(at),o&&t(de),o&&t(st),o&&t(Z),x(N),o&&t(B),o&&t(K),o&&t(ke),o&&t(te),o&&t(Np),o&&t(Mi),o&&t(Dp),x(Sa,o),o&&t(Lp),o&&t(zi),o&&t(Gp),x(Ia,o),o&&t(Wp),o&&t(ro),x(Na),o&&t(Up),o&&t(Dt),o&&t(Rp),o&&t(Fi),o&&t(Xp),o&&t(qi),o&&t(Qp),o&&t(io),x(La),o&&t(Hp),o&&t(rt),o&&t(Vp),o&&t(Ho),o&&t(Kp),o&&t(Bi),o&&t(Jp),x(Ga,o),o&&t(Zp),o&&t(Ei),o&&t(Yp),x(Ua,o),o&&t(eu),o&&t(lo),x(Ra),o&&t(tu),o&&t(be),o&&t(ou),o&&t(co),x(Xa),o&&t(nu),o&&t(Ze),x(Qa),x(Jo),o&&t(au),o&&t(ho),x(Va),o&&t(su),o&&t(ue),x(Ka),x(Yo),x(Za),o&&t(ru),o&&t(fo),x(ns),o&&t(iu),o&&t(D),x(as),x(tn),x(is),x(us),x(hs),x(ms),o&&t(du),o&&t(ko),x(fs),o&&t(lu),o&&t(L),x(_s),x(rn),x(vs),x(xs),x(Ms),x(Fs),x(qs),o&&t(cu),o&&t(bo),x(js),o&&t(pu),o&&t(Y),x(Bs),x(hn),x(As),x(Ns),x(Ds),o&&t(uu),o&&t(yo),x(Ls),o&&t(hu),o&&t(Ye),x(Gs),x(Xs),x(gn),x(kn),o&&t(mu),o&&t(wo),x(Qs),o&&t(fu),o&&t(et),x(Hs),x(Zs),x(vn),x(yn),x(Tn),o&&t(_u),o&&t(xo),x(Ys),o&&t(gu),o&&t(Ee),x(er),x(ar),x($n),x(xn),o&&t(ku),o&&t(Fo),x(sr),o&&t(bu),o&&t(Ce),x(rr),x(cr),x(zn),x(Fn),x(qn),o&&t(vu),o&&t(jo),x(pr),o&&t(yu),o&&t(Bo),x(ur),x(hr),x(En),o&&t(Tu),o&&t(Eo),x(mr),o&&t(wu),o&&t(Ae),x(fr),x(An),x(br),x(Pn),x(Sn),o&&t($u),o&&t(Ao),x(vr),o&&t(xu),o&&t(Pe),x(yr),x(In),x(xr),x(Nn),x(Dn),x(Ln),o&&t(Mu),o&&t(So),x(Mr),o&&t(zu),o&&t(H),x(zr),x(Pr),x(Wn),x(Un),x(Sr),x(Xn),x(Or),x(Hn),o&&t(Fu),o&&t(Io),x(Ir),o&&t(qu),o&&t(V),x(Nr),x(Qr),x(Kn),x(Jn),x(Zn),x(Hr),x(ea),x(Vr),x(oa),o&&t(ju),o&&t(Do),x(Kr),o&&t(Bu),o&&t(G),x(Jr),x(si),x(aa),x(sa),x(ri),x(ia),x(ii),x(la),o&&t(Eu),o&&t(Go),x(di),o&&t(Cu),o&&t(W),x(li),x(gi),x(pa),x(ua),x(ki),x(ma),x(bi),x(_a)}}}const q1={local:"mbart-and-mbart50",sections:[{local:"overview-of-mbart",sections:[{local:"training-of-mbart",title:"Training of MBart"}],title:"Overview of MBart"},{local:"overview-of-mbart50",sections:[{local:"training-of-mbart50",title:"Training of MBart-50"}],title:"Overview of MBart-50"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.MBartConfig",title:"MBartConfig"},{local:"transformers.MBartTokenizer",title:"MBartTokenizer"},{local:"transformers.MBartTokenizerFast",title:"MBartTokenizerFast"},{local:"transformers.MBart50Tokenizer",title:"MBart50Tokenizer"},{local:"transformers.MBart50TokenizerFast",title:"MBart50TokenizerFast"},{local:"transformers.MBartModel",title:"MBartModel"},{local:"transformers.MBartForConditionalGeneration",title:"MBartForConditionalGeneration"},{local:"transformers.MBartForQuestionAnswering",title:"MBartForQuestionAnswering"},{local:"transformers.MBartForSequenceClassification",title:"MBartForSequenceClassification"},{local:"transformers.MBartForCausalLM",title:"MBartForCausalLM"},{local:"transformers.TFMBartModel",title:"TFMBartModel"},{local:"transformers.TFMBartForConditionalGeneration",title:"TFMBartForConditionalGeneration"},{local:"transformers.FlaxMBartModel",title:"FlaxMBartModel"},{local:"transformers.FlaxMBartForConditionalGeneration",title:"FlaxMBartForConditionalGeneration"},{local:"transformers.FlaxMBartForSequenceClassification",title:"FlaxMBartForSequenceClassification"},{local:"transformers.FlaxMBartForQuestionAnswering",title:"FlaxMBartForQuestionAnswering"}],title:"MBart and MBart-50"};function j1(M){return Lx(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class O1 extends Ox{constructor(l){super();Ix(this,l,j1,F1,Nx,{})}}export{O1 as default,q1 as metadata};
