import{S as Z1,i as G1,s as W1,e as a,k as c,w as M,t as i,M as N1,c as s,d as t,m as p,a as r,x as T,h as d,b as m,N as I1,G as e,g as _,y as v,q as k,o as w,B as J,v as R1,L as q}from"../../chunks/vendor-hf-doc-builder.js";import{T as yt}from"../../chunks/Tip-hf-doc-builder.js";import{D as j}from"../../chunks/Docstring-hf-doc-builder.js";import{C as x}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as A}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as C}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function X1(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1CYXJ0Q29uZmlnJTJDJTIwTUJhcnRNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBNQkFSVCUyMGZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBNQmFydENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWNjMjUlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyME1CYXJ0TW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function V1(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1CYXJ0VG9rZW5pemVyJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwTUJhcnRUb2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtZW4tcm8lMjIlMkMlMjBzcmNfbGFuZyUzRCUyMmVuX1hYJTIyJTJDJTIwdGd0X2xhbmclM0QlMjJyb19STyUyMiklMEFleGFtcGxlX2VuZ2xpc2hfcGhyYXNlJTIwJTNEJTIwJTIyJTIwVU4lMjBDaGllZiUyMFNheXMlMjBUaGVyZSUyMElzJTIwTm8lMjBNaWxpdGFyeSUyMFNvbHV0aW9uJTIwaW4lMjBTeXJpYSUyMiUwQWV4cGVjdGVkX3RyYW5zbGF0aW9uX3JvbWFuaWFuJTIwJTNEJTIwJTIyJUM1JTlFZWZ1bCUyME9OVSUyMGRlY2xhciVDNCU4MyUyMGMlQzQlODMlMjBudSUyMGV4aXN0JUM0JTgzJTIwbyUyMHNvbHUlQzUlQTNpZSUyMG1pbGl0YXIlQzQlODMlMjAlQzMlQUVuJTIwU2lyaWElMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoZXhhbXBsZV9lbmdsaXNoX3BocmFzZSUyQyUyMHRleHRfdGFyZ2V0JTNEZXhwZWN0ZWRfdHJhbnNsYXRpb25fcm9tYW5pYW4lMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKQ==",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Examples:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function S1(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1CYXJ0VG9rZW5pemVyRmFzdCUwQSUwQXRva2VuaXplciUyMCUzRCUyME1CYXJ0VG9rZW5pemVyRmFzdC5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1lbi1ybyUyMiUyQyUyMHNyY19sYW5nJTNEJTIyZW5fWFglMjIlMkMlMjB0Z3RfbGFuZyUzRCUyMnJvX1JPJTIyJTBBKSUwQWV4YW1wbGVfZW5nbGlzaF9waHJhc2UlMjAlM0QlMjAlMjIlMjBVTiUyMENoaWVmJTIwU2F5cyUyMFRoZXJlJTIwSXMlMjBObyUyME1pbGl0YXJ5JTIwU29sdXRpb24lMjBpbiUyMFN5cmlhJTIyJTBBZXhwZWN0ZWRfdHJhbnNsYXRpb25fcm9tYW5pYW4lMjAlM0QlMjAlMjIlQzUlOUVlZnVsJTIwT05VJTIwZGVjbGFyJUM0JTgzJTIwYyVDNCU4MyUyMG51JTIwZXhpc3QlQzQlODMlMjBvJTIwc29sdSVDNSVBM2llJTIwbWlsaXRhciVDNCU4MyUyMCVDMyVBRW4lMjBTaXJpYSUyMiUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihleGFtcGxlX2VuZ2xpc2hfcGhyYXNlJTJDJTIwdGV4dF90YXJnZXQlM0RleHBlY3RlZF90cmFuc2xhdGlvbl9yb21hbmlhbiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIp",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Examples:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function A1(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1CYXJ0NTBUb2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBNQmFydDUwVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLTUwJTIyJTJDJTIwc3JjX2xhbmclM0QlMjJlbl9YWCUyMiUyQyUyMHRndF9sYW5nJTNEJTIycm9fUk8lMjIpJTBBc3JjX3RleHQlMjAlM0QlMjAlMjIlMjBVTiUyMENoaWVmJTIwU2F5cyUyMFRoZXJlJTIwSXMlMjBObyUyME1pbGl0YXJ5JTIwU29sdXRpb24lMjBpbiUyMFN5cmlhJTIyJTBBdGd0X3RleHQlMjAlM0QlMjAlMjIlQzUlOUVlZnVsJTIwT05VJTIwZGVjbGFyJUM0JTgzJTIwYyVDNCU4MyUyMG51JTIwZXhpc3QlQzQlODMlMjBvJTIwc29sdSVDNSVBM2llJTIwbWlsaXRhciVDNCU4MyUyMCVDMyVBRW4lMjBTaXJpYSUyMiUwQW1vZGVsX2lucHV0cyUyMCUzRCUyMHRva2VuaXplcihzcmNfdGV4dCUyQyUyMHRleHRfdGFyZ2V0JTNEdGd0X3RleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUyMyUyMG1vZGVsKCoqbW9kZWxfaW5wdXRzKSUyMHNob3VsZCUyMHdvcms=",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Examples:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function Y1(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1CYXJ0NTBUb2tlbml6ZXJGYXN0JTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwTUJhcnQ1MFRva2VuaXplckZhc3QuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtNTAlMjIlMkMlMjBzcmNfbGFuZyUzRCUyMmVuX1hYJTIyJTJDJTIwdGd0X2xhbmclM0QlMjJyb19STyUyMiklMEFzcmNfdGV4dCUyMCUzRCUyMCUyMiUyMFVOJTIwQ2hpZWYlMjBTYXlzJTIwVGhlcmUlMjBJcyUyME5vJTIwTWlsaXRhcnklMjBTb2x1dGlvbiUyMGluJTIwU3lyaWElMjIlMEF0Z3RfdGV4dCUyMCUzRCUyMCUyMiVDNSU5RWVmdWwlMjBPTlUlMjBkZWNsYXIlQzQlODMlMjBjJUM0JTgzJTIwbnUlMjBleGlzdCVDNCU4MyUyMG8lMjBzb2x1JUM1JUEzaWUlMjBtaWxpdGFyJUM0JTgzJTIwJUMzJUFFbiUyMFNpcmlhJTIyJTBBbW9kZWxfaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHNyY190ZXh0JTJDJTIwdGV4dF90YXJnZXQlM0R0Z3RfdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTIzJTIwbW9kZWwoKiptb2RlbF9pbnB1dHMpJTIwc2hvdWxkJTIwd29yaw==",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Examples:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function Q1(F){let l,b,f,h,y;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"),y=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 B=r(f);h=d(B,"Module"),B.forEach(t),y=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){_(n,l,u),e(l,b),e(l,f),e(f,h),e(l,y)},d(n){n&&t(l)}}}function O1(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNQmFydE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWNjMjUlMjIpJTBBbW9kZWwlMjAlM0QlMjBNQmFydE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWNjMjUlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function P1(F){let l,b,f,h,y;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"),y=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 B=r(f);h=d(B,"Module"),B.forEach(t),y=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){_(n,l,u),e(l,b),e(l,f),e(f,h),e(l,y)},d(n){n&&t(l)}}}function D1(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQSUwQW1vZGVsJTIwJTNEJTIwTUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtZW4tcm8lMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1lbi1ybyUyMiklMEElMEFleGFtcGxlX2VuZ2xpc2hfcGhyYXNlJTIwJTNEJTIwJTIyNDIlMjBpcyUyMHRoZSUyMGFuc3dlciUyMiUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihleGFtcGxlX2VuZ2xpc2hfcGhyYXNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEElMjMlMjBUcmFuc2xhdGUlMEFnZW5lcmF0ZWRfaWRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKippbnB1dHMlMkMlMjBudW1fYmVhbXMlM0Q0JTJDJTIwbWF4X2xlbmd0aCUzRDUpJTBBdG9rZW5pemVyLmJhdGNoX2RlY29kZShnZW5lcmF0ZWRfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUlMkMlMjBjbGVhbl91cF90b2tlbml6YXRpb25fc3BhY2VzJTNERmFsc2UpJTVCMCU1RA==",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Translation example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function H1(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQSUwQW1vZGVsJTIwJTNEJTIwTUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWNjMjUlMjIpJTBBJTBBJTIzJTIwZGVfREUlMjBpcyUyMHRoZSUyMGxhbmd1YWdlJTIwc3ltYm9sJTIwaWQlMjAlM0NMSUQlM0UlMjBmb3IlMjBHZXJtYW4lMEFUWFQlMjAlM0QlMjAlMjIlM0MlMkZzJTNFJTIwTWVpbmUlMjBGcmV1bmRlJTIwc2luZCUyMCUzQ21hc2slM0UlMjBuZXR0JTIwYWJlciUyMHNpZSUyMGVzc2VuJTIwenUlMjB2aWVsJTIwS3VjaGVuLiUyMCUzQyUyRnMlM0UlMjBkZV9ERSUyMiUwQSUwQWlucHV0X2lkcyUyMCUzRCUyMHRva2VuaXplciglNUJUWFQlNUQlMkMlMjBhZGRfc3BlY2lhbF90b2tlbnMlM0RGYWxzZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTVCJTIyaW5wdXRfaWRzJTIyJTVEJTBBbG9naXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRfaWRzKS5sb2dpdHMlMEElMEFtYXNrZWRfaW5kZXglMjAlM0QlMjAoaW5wdXRfaWRzJTVCMCU1RCUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkKS5ub256ZXJvKCkuaXRlbSgpJTBBcHJvYnMlMjAlM0QlMjBsb2dpdHMlNUIwJTJDJTIwbWFza2VkX2luZGV4JTVELnNvZnRtYXgoZGltJTNEMCklMEF2YWx1ZXMlMkMlMjBwcmVkaWN0aW9ucyUyMCUzRCUyMHByb2JzLnRvcGsoNSklMEElMEF0b2tlbml6ZXIuZGVjb2RlKHByZWRpY3Rpb25zKS5zcGxpdCgp",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Mask filling example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function L1(F){let l,b,f,h,y;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"),y=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 B=r(f);h=d(B,"Module"),B.forEach(t),y=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){_(n,l,u),e(l,b),e(l,f),e(f,h),e(l,y)},d(n){n&&t(l)}}}function K1(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNQmFydEZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWNjMjUlMjIpJTBBbW9kZWwlMjAlM0QlMjBNQmFydEZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWNjMjUlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWFuc3dlcl9zdGFydF9pbmRleCUyMCUzRCUyMG91dHB1dHMuc3RhcnRfbG9naXRzLmFyZ21heCgpJTBBYW5zd2VyX2VuZF9pbmRleCUyMCUzRCUyMG91dHB1dHMuZW5kX2xvZ2l0cy5hcmdtYXgoKSUwQSUwQXByZWRpY3RfYW5zd2VyX3Rva2VucyUyMCUzRCUyMGlucHV0cy5pbnB1dF9pZHMlNUIwJTJDJTIwYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNBJTIwYW5zd2VyX2VuZF9pbmRleCUyMCUyQiUyMDElNUQlMEElMEElMjMlMjB0YXJnZXQlMjBpcyUyMCUyMm5pY2UlMjBwdXBwZXQlMjIlMEF0YXJnZXRfc3RhcnRfaW5kZXglMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCMTQlNUQpJTBBdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxNSU1RCklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBzdGFydF9wb3NpdGlvbnMlM0R0YXJnZXRfc3RhcnRfaW5kZXglMkMlMjBlbmRfcG9zaXRpb25zJTNEdGFyZ2V0X2VuZF9pbmRleCklMEFsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3Nz",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function eJ(F){let l,b,f,h,y;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"),y=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 B=r(f);h=d(B,"Module"),B.forEach(t),y=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){_(n,l,u),e(l,b),e(l,f),e(f,h),e(l,y)},d(n){n&&t(l)}}}function tJ(F){let l,b,f,h,y;return h=new x({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyME1CYXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEFtb2RlbCUyMCUzRCUyME1CYXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF9jbGFzc19pZCUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoKS5pdGVtKCklMEElMEElMjMlMjBUbyUyMHRyYWluJTIwYSUyMG1vZGVsJTIwb24lMjAlNjBudW1fbGFiZWxzJTYwJTIwY2xhc3NlcyUyQyUyMHlvdSUyMGNhbiUyMHBhc3MlMjAlNjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyU2MCUyMHRvJTIwJTYwLmZyb21fcHJldHJhaW5lZCguLi4pJTYwJTBBbnVtX2xhYmVscyUyMCUzRCUyMGxlbihtb2RlbC5jb25maWcuaWQybGFiZWwpJTBBbW9kZWwlMjAlM0QlMjBNQmFydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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(),M(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),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function oJ(F){let l,b,f,h,y;return h=new x({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyME1CYXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEFtb2RlbCUyMCUzRCUyME1CYXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkcyUyMCUzRCUyMHRvcmNoLmFyYW5nZSgwJTJDJTIwbG9naXRzLnNoYXBlJTVCLTElNUQpJTVCdG9yY2guc2lnbW9pZChsb2dpdHMpLnNxdWVlemUoZGltJTNEMCklMjAlM0UlMjAwLjUlNUQlMEElMEElMjMlMjBUbyUyMHRyYWluJTIwYSUyMG1vZGVsJTIwb24lMjAlNjBudW1fbGFiZWxzJTYwJTIwY2xhc3NlcyUyQyUyMHlvdSUyMGNhbiUyMHBhc3MlMjAlNjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyU2MCUyMHRvJTIwJTYwLmZyb21fcHJldHJhaW5lZCguLi4pJTYwJTBBbnVtX2xhYmVscyUyMCUzRCUyMGxlbihtb2RlbC5jb25maWcuaWQybGFiZWwpJTBBbW9kZWwlMjAlM0QlMjBNQmFydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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(),M(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),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function nJ(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNQmFydEZvckNhdXNhbExNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQW1vZGVsJTIwJTNEJTIwTUJhcnRGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyJTJDJTIwYWRkX2Nyb3NzX2F0dGVudGlvbiUzREZhbHNlKSUwQWFzc2VydCUyMG1vZGVsLmNvbmZpZy5pc19kZWNvZGVyJTJDJTIwZiUyMiU3Qm1vZGVsLl9fY2xhc3NfXyU3RCUyMGhhcyUyMHRvJTIwYmUlMjBjb25maWd1cmVkJTIwYXMlMjBhJTIwZGVjb2Rlci4lMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRzJTBBZXhwZWN0ZWRfc2hhcGUlMjAlM0QlMjAlNUIxJTJDJTIwaW5wdXRzLmlucHV0X2lkcy5zaGFwZSU1Qi0xJTVEJTJDJTIwbW9kZWwuY29uZmlnLnZvY2FiX3NpemUlNUQlMEFsaXN0KGxvZ2l0cy5zaGFwZSklMjAlM0QlM0QlMjBleHBlY3RlZF9zaGFwZQ==",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function aJ(F){let l,b,f,h,y,n,u,B,bt,ot,Y,Ie,he,z,Mt,ee,Ze,Wt,me,re,Ye,ve,Tt,ke,we,vt,nt,Q,fe,Qe,ie,Z,G,kt,ge,_e,wt,H,Jt,Ft,S,Ge,Je,at,de,Fe,Ue,Ut,le,je,Be,st,L,I,Oe,W,jt,Pe;return{c(){l=a("p"),b=i("TensorFlow models and layers in "),f=a("code"),h=i("transformers"),y=i(" accept two formats as input:"),n=c(),u=a("ul"),B=a("li"),bt=i("having all inputs as keyword arguments (like PyTorch models), or"),ot=c(),Y=a("li"),Ie=i("having all inputs as a list, tuple or dict in the first positional argument."),he=c(),z=a("p"),Mt=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"),Ze=i("model.fit()"),Wt=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()"),Ye=i(` supports! If, however, you want to use the second
format outside of Keras methods like `),ve=a("code"),Tt=i("fit()"),ke=i(" and "),we=a("code"),vt=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(),Z=a("ul"),G=a("li"),kt=i("a single Tensor with "),ge=a("code"),_e=i("input_ids"),wt=i(" only and nothing else: "),H=a("code"),Jt=i("model(input_ids)"),Ft=c(),S=a("li"),Ge=i(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Je=a("code"),at=i("model([input_ids, attention_mask])"),de=i(" or "),Fe=a("code"),Ue=i("model([input_ids, attention_mask, token_type_ids])"),Ut=c(),le=a("li"),je=i(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Be=a("code"),st=i('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),L=c(),I=a("p"),Oe=i(`Note that when creating models and layers with
`),W=a("a"),jt=i("subclassing"),Pe=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(U){l=s(U,"P",{});var $=r(l);b=d($,"TensorFlow models and layers in "),f=s($,"CODE",{});var D=r(f);h=d(D,"transformers"),D.forEach(t),y=d($," accept two formats as input:"),$.forEach(t),n=p(U),u=s(U,"UL",{});var De=r(u);B=s(De,"LI",{});var Bt=r(B);bt=d(Bt,"having all inputs as keyword arguments (like PyTorch models), or"),Bt.forEach(t),ot=p(De),Y=s(De,"LI",{});var Ht=r(Y);Ie=d(Ht,"having all inputs as a list, tuple or dict in the first positional argument."),Ht.forEach(t),De.forEach(t),he=p(U),z=s(U,"P",{});var E=r(z);Mt=d(E,`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(E,"CODE",{});var zt=r(ee);Ze=d(zt,"model.fit()"),zt.forEach(t),Wt=d(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),me=s(E,"CODE",{});var Lt=r(me);re=d(Lt,"model.fit()"),Lt.forEach(t),Ye=d(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),ve=s(E,"CODE",{});var Kt=r(ve);Tt=d(Kt,"fit()"),Kt.forEach(t),ke=d(E," and "),we=s(E,"CODE",{});var $t=r(we);vt=d($t,"predict()"),$t.forEach(t),nt=d(E,`, such as when creating your own layers or models with
the Keras `),Q=s(E,"CODE",{});var eo=r(Q);fe=d(eo,"Functional"),eo.forEach(t),Qe=d(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),ie=p(U),Z=s(U,"UL",{});var ce=r(Z);G=s(ce,"LI",{});var pe=r(G);kt=d(pe,"a single Tensor with "),ge=s(pe,"CODE",{});var to=r(ge);_e=d(to,"input_ids"),to.forEach(t),wt=d(pe," only and nothing else: "),H=s(pe,"CODE",{});var oo=r(H);Jt=d(oo,"model(input_ids)"),oo.forEach(t),pe.forEach(t),Ft=p(ce),S=s(ce,"LI",{});var ye=r(S);Ge=d(ye,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Je=s(ye,"CODE",{});var te=r(Je);at=d(te,"model([input_ids, attention_mask])"),te.forEach(t),de=d(ye," or "),Fe=s(ye,"CODE",{});var no=r(Fe);Ue=d(no,"model([input_ids, attention_mask, token_type_ids])"),no.forEach(t),ye.forEach(t),Ut=p(ce),le=s(ce,"LI",{});var ze=r(le);je=d(ze,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Be=s(ze,"CODE",{});var xt=r(Be);st=d(xt,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),xt.forEach(t),ze.forEach(t),ce.forEach(t),L=p(U),I=s(U,"P",{});var He=r(I);Oe=d(He,`Note that when creating models and layers with
`),W=s(He,"A",{href:!0,rel:!0});var ao=r(W);jt=d(ao,"subclassing"),ao.forEach(t),Pe=d(He,` 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!`),He.forEach(t),this.h()},h(){m(W,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(W,"rel","nofollow")},m(U,$){_(U,l,$),e(l,b),e(l,f),e(f,h),e(l,y),_(U,n,$),_(U,u,$),e(u,B),e(B,bt),e(u,ot),e(u,Y),e(Y,Ie),_(U,he,$),_(U,z,$),e(z,Mt),e(z,ee),e(ee,Ze),e(z,Wt),e(z,me),e(me,re),e(z,Ye),e(z,ve),e(ve,Tt),e(z,ke),e(z,we),e(we,vt),e(z,nt),e(z,Q),e(Q,fe),e(z,Qe),_(U,ie,$),_(U,Z,$),e(Z,G),e(G,kt),e(G,ge),e(ge,_e),e(G,wt),e(G,H),e(H,Jt),e(Z,Ft),e(Z,S),e(S,Ge),e(S,Je),e(Je,at),e(S,de),e(S,Fe),e(Fe,Ue),e(Z,Ut),e(Z,le),e(le,je),e(le,Be),e(Be,st),_(U,L,$),_(U,I,$),e(I,Oe),e(I,W),e(W,jt),e(I,Pe)},d(U){U&&t(l),U&&t(n),U&&t(u),U&&t(he),U&&t(z),U&&t(ie),U&&t(Z),U&&t(L),U&&t(I)}}}function sJ(F){let l,b,f,h,y;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"),y=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 B=r(f);h=d(B,"Module"),B.forEach(t),y=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){_(n,l,u),e(l,b),e(l,f),e(f,h),e(l,y)},d(n){n&&t(l)}}}function rJ(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURk1CYXJ0TW9kZWwlMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGTUJhcnRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function iJ(F){let l,b,f,h,y,n,u,B,bt,ot,Y,Ie,he,z,Mt,ee,Ze,Wt,me,re,Ye,ve,Tt,ke,we,vt,nt,Q,fe,Qe,ie,Z,G,kt,ge,_e,wt,H,Jt,Ft,S,Ge,Je,at,de,Fe,Ue,Ut,le,je,Be,st,L,I,Oe,W,jt,Pe;return{c(){l=a("p"),b=i("TensorFlow models and layers in "),f=a("code"),h=i("transformers"),y=i(" accept two formats as input:"),n=c(),u=a("ul"),B=a("li"),bt=i("having all inputs as keyword arguments (like PyTorch models), or"),ot=c(),Y=a("li"),Ie=i("having all inputs as a list, tuple or dict in the first positional argument."),he=c(),z=a("p"),Mt=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"),Ze=i("model.fit()"),Wt=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()"),Ye=i(` supports! If, however, you want to use the second
format outside of Keras methods like `),ve=a("code"),Tt=i("fit()"),ke=i(" and "),we=a("code"),vt=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(),Z=a("ul"),G=a("li"),kt=i("a single Tensor with "),ge=a("code"),_e=i("input_ids"),wt=i(" only and nothing else: "),H=a("code"),Jt=i("model(input_ids)"),Ft=c(),S=a("li"),Ge=i(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Je=a("code"),at=i("model([input_ids, attention_mask])"),de=i(" or "),Fe=a("code"),Ue=i("model([input_ids, attention_mask, token_type_ids])"),Ut=c(),le=a("li"),je=i(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Be=a("code"),st=i('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),L=c(),I=a("p"),Oe=i(`Note that when creating models and layers with
`),W=a("a"),jt=i("subclassing"),Pe=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(U){l=s(U,"P",{});var $=r(l);b=d($,"TensorFlow models and layers in "),f=s($,"CODE",{});var D=r(f);h=d(D,"transformers"),D.forEach(t),y=d($," accept two formats as input:"),$.forEach(t),n=p(U),u=s(U,"UL",{});var De=r(u);B=s(De,"LI",{});var Bt=r(B);bt=d(Bt,"having all inputs as keyword arguments (like PyTorch models), or"),Bt.forEach(t),ot=p(De),Y=s(De,"LI",{});var Ht=r(Y);Ie=d(Ht,"having all inputs as a list, tuple or dict in the first positional argument."),Ht.forEach(t),De.forEach(t),he=p(U),z=s(U,"P",{});var E=r(z);Mt=d(E,`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(E,"CODE",{});var zt=r(ee);Ze=d(zt,"model.fit()"),zt.forEach(t),Wt=d(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),me=s(E,"CODE",{});var Lt=r(me);re=d(Lt,"model.fit()"),Lt.forEach(t),Ye=d(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),ve=s(E,"CODE",{});var Kt=r(ve);Tt=d(Kt,"fit()"),Kt.forEach(t),ke=d(E," and "),we=s(E,"CODE",{});var $t=r(we);vt=d($t,"predict()"),$t.forEach(t),nt=d(E,`, such as when creating your own layers or models with
the Keras `),Q=s(E,"CODE",{});var eo=r(Q);fe=d(eo,"Functional"),eo.forEach(t),Qe=d(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),ie=p(U),Z=s(U,"UL",{});var ce=r(Z);G=s(ce,"LI",{});var pe=r(G);kt=d(pe,"a single Tensor with "),ge=s(pe,"CODE",{});var to=r(ge);_e=d(to,"input_ids"),to.forEach(t),wt=d(pe," only and nothing else: "),H=s(pe,"CODE",{});var oo=r(H);Jt=d(oo,"model(input_ids)"),oo.forEach(t),pe.forEach(t),Ft=p(ce),S=s(ce,"LI",{});var ye=r(S);Ge=d(ye,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Je=s(ye,"CODE",{});var te=r(Je);at=d(te,"model([input_ids, attention_mask])"),te.forEach(t),de=d(ye," or "),Fe=s(ye,"CODE",{});var no=r(Fe);Ue=d(no,"model([input_ids, attention_mask, token_type_ids])"),no.forEach(t),ye.forEach(t),Ut=p(ce),le=s(ce,"LI",{});var ze=r(le);je=d(ze,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Be=s(ze,"CODE",{});var xt=r(Be);st=d(xt,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),xt.forEach(t),ze.forEach(t),ce.forEach(t),L=p(U),I=s(U,"P",{});var He=r(I);Oe=d(He,`Note that when creating models and layers with
`),W=s(He,"A",{href:!0,rel:!0});var ao=r(W);jt=d(ao,"subclassing"),ao.forEach(t),Pe=d(He,` 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!`),He.forEach(t),this.h()},h(){m(W,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(W,"rel","nofollow")},m(U,$){_(U,l,$),e(l,b),e(l,f),e(f,h),e(l,y),_(U,n,$),_(U,u,$),e(u,B),e(B,bt),e(u,ot),e(u,Y),e(Y,Ie),_(U,he,$),_(U,z,$),e(z,Mt),e(z,ee),e(ee,Ze),e(z,Wt),e(z,me),e(me,re),e(z,Ye),e(z,ve),e(ve,Tt),e(z,ke),e(z,we),e(we,vt),e(z,nt),e(z,Q),e(Q,fe),e(z,Qe),_(U,ie,$),_(U,Z,$),e(Z,G),e(G,kt),e(G,ge),e(ge,_e),e(G,wt),e(G,H),e(H,Jt),e(Z,Ft),e(Z,S),e(S,Ge),e(S,Je),e(Je,at),e(S,de),e(S,Fe),e(Fe,Ue),e(Z,Ut),e(Z,le),e(le,je),e(le,Be),e(Be,st),_(U,L,$),_(U,I,$),e(I,Oe),e(I,W),e(W,jt),e(I,Pe)},d(U){U&&t(l),U&&t(n),U&&t(u),U&&t(he),U&&t(z),U&&t(ie),U&&t(Z),U&&t(L),U&&t(I)}}}function dJ(F){let l,b,f,h,y;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"),y=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 B=r(f);h=d(B,"Module"),B.forEach(t),y=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){_(n,l,u),e(l,b),e(l,f),e(f,h),e(l,y)},d(n){n&&t(l)}}}function lJ(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURk1CYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTBBJTBBbW9kZWwlMjAlM0QlMjBURk1CYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWVuLXJvJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtZW4tcm8lMjIpJTBBJTBBZXhhbXBsZV9lbmdsaXNoX3BocmFzZSUyMCUzRCUyMCUyMjQyJTIwaXMlMjB0aGUlMjBhbnN3ZXIlMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoZXhhbXBsZV9lbmdsaXNoX3BocmFzZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBJTBBJTIzJTIwVHJhbnNsYXRlJTBBZ2VuZXJhdGVkX2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqaW5wdXRzJTJDJTIwbnVtX2JlYW1zJTNENCUyQyUyMG1heF9sZW5ndGglM0Q1KSUwQXRva2VuaXplci5iYXRjaF9kZWNvZGUoZ2VuZXJhdGVkX2lkcyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlJTJDJTIwY2xlYW5fdXBfdG9rZW5pemF0aW9uX3NwYWNlcyUzREZhbHNlKSU1QjAlNUQ=",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Translation example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function cJ(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURk1CYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEFtb2RlbCUyMCUzRCUyMFRGTUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWNjMjUlMjIpJTBBJTBBJTIzJTIwZGVfREUlMjBpcyUyMHRoZSUyMGxhbmd1YWdlJTIwc3ltYm9sJTIwaWQlMjAlM0NMSUQlM0UlMjBmb3IlMjBHZXJtYW4lMEFUWFQlMjAlM0QlMjAlMjIlM0MlMkZzJTNFJTIwTWVpbmUlMjBGcmV1bmRlJTIwc2luZCUyMCUzQ21hc2slM0UlMjBuZXR0JTIwYWJlciUyMHNpZSUyMGVzc2VuJTIwenUlMjB2aWVsJTIwS3VjaGVuLiUyMCUzQyUyRnMlM0UlMjBkZV9ERSUyMiUwQSUwQWlucHV0X2lkcyUyMCUzRCUyMHRva2VuaXplciglNUJUWFQlNUQlMkMlMjBhZGRfc3BlY2lhbF90b2tlbnMlM0RGYWxzZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTVCJTIyaW5wdXRfaWRzJTIyJTVEJTBBbG9naXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRfaWRzKS5sb2dpdHMlMEElMEFtYXNrZWRfaW5kZXglMjAlM0QlMjB0Zi53aGVyZShpbnB1dF9pZHMlNUIwJTVEJTIwJTNEJTNEJTIwdG9rZW5pemVyLm1hc2tfdG9rZW5faWQpJTVCMCUyQyUyMDAlNUQlMEFwcm9icyUyMCUzRCUyMHRmLm5uLnNvZnRtYXgobG9naXRzJTVCMCUyQyUyMG1hc2tlZF9pbmRleCU1RCUyQyUyMGF4aXMlM0QwKSUwQXZhbHVlcyUyQyUyMHByZWRpY3Rpb25zJTIwJTNEJTIwdGYubWF0aC50b3Bfayhwcm9icyUyQyUyMDUpJTBBJTBBdG9rZW5pemVyLmRlY29kZShwcmVkaWN0aW9ucykuc3BsaXQoKQ==",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Mask filling example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function pJ(F){let l,b,f,h,y;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"),y=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 B=r(f);h=d(B,"Module"),B.forEach(t),y=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){_(n,l,u),e(l,b),e(l,f),e(f,h),e(l,y)},d(n){n&&t(l)}}}function uJ(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRNb2RlbCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWNjMjUlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function hJ(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEElMEF0ZXh0JTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwY29vbCUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlMkMlMjBtYXhfbGVuZ3RoJTNEMTAyNCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQWVuY29kZXJfb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmVuY29kZSgqKmlucHV0cyk=",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function mJ(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEElMEF0ZXh0JTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwY29vbCUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlMkMlMjBtYXhfbGVuZ3RoJTNEMTAyNCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQWVuY29kZXJfb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmVuY29kZSgqKmlucHV0cyklMEElMEFkZWNvZGVyX3N0YXJ0X3Rva2VuX2lkJTIwJTNEJTIwbW9kZWwuY29uZmlnLmRlY29kZXJfc3RhcnRfdG9rZW5faWQlMEFkZWNvZGVyX2lucHV0X2lkcyUyMCUzRCUyMGpucC5vbmVzKChpbnB1dHMuaW5wdXRfaWRzLnNoYXBlJTVCMCU1RCUyQyUyMDEpJTJDJTIwZHR5cGUlM0QlMjJpNCUyMiklMjAqJTIwZGVjb2Rlcl9zdGFydF90b2tlbl9pZCUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbC5kZWNvZGUoZGVjb2Rlcl9pbnB1dF9pZHMlMkMlMjBlbmNvZGVyX291dHB1dHMpJTBBbGFzdF9kZWNvZGVyX2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function fJ(F){let l,b,f,h,y;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"),y=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 B=r(f);h=d(B,"Module"),B.forEach(t),y=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){_(n,l,u),e(l,b),e(l,f),e(f,h),e(l,y)},d(n){n&&t(l)}}}function gJ(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMkMlMjBNQmFydENvbmZpZyUwQSUwQW1vZGVsJTIwJTNEJTIwRmxheE1CYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWNjMjUlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQSUwQUFSVElDTEVfVE9fU1VNTUFSSVpFJTIwJTNEJTIwJTIyTWVpbmUlMjBGcmV1bmRlJTIwc2luZCUyMGNvb2wlMkMlMjBhYmVyJTIwc2llJTIwZXNzZW4lMjB6dSUyMHZpZWwlMjBLdWNoZW4uJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCU1QkFSVElDTEVfVE9fU1VNTUFSSVpFJTVEJTJDJTIwbWF4X2xlbmd0aCUzRDEwMjQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMm5wJTIyKSUwQSUwQSUyMyUyMEdlbmVyYXRlJTIwU3VtbWFyeSUwQXN1bW1hcnlfaWRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoaW5wdXRzJTVCJTIyaW5wdXRfaWRzJTIyJTVEJTJDJTIwbnVtX2JlYW1zJTNENCUyQyUyMG1heF9sZW5ndGglM0Q1KS5zZXF1ZW5jZXMlMEFwcmludCh0b2tlbml6ZXIuYmF0Y2hfZGVjb2RlKHN1bW1hcnlfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUlMkMlMjBjbGVhbl91cF90b2tlbml6YXRpb25fc3BhY2VzJTNERmFsc2UpKQ==",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Summarization example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function _J(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEElMEElMjMlMjBkZV9ERSUyMGlzJTIwdGhlJTIwbGFuZ3VhZ2UlMjBzeW1ib2wlMjBpZCUyMCUzQ0xJRCUzRSUyMGZvciUyMEdlcm1hbiUwQVRYVCUyMCUzRCUyMCUyMiUzQyUyRnMlM0UlMjBNZWluZSUyMEZyZXVuZGUlMjBzaW5kJTIwJTNDbWFzayUzRSUyMG5ldHQlMjBhYmVyJTIwc2llJTIwZXNzZW4lMjB6dSUyMHZpZWwlMjBLdWNoZW4uJTIwJTNDJTJGcyUzRSUyMGRlX0RFJTIyJTBBaW5wdXRfaWRzJTIwJTNEJTIwdG9rZW5pemVyKCU1QlRYVCU1RCUyQyUyMGFkZF9zcGVjaWFsX3Rva2VucyUzREZhbHNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJucCUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMEFsb2dpdHMlMjAlM0QlMjBtb2RlbChpbnB1dF9pZHMpLmxvZ2l0cyUwQW1hc2tlZF9pbmRleCUyMCUzRCUyMChpbnB1dF9pZHMlNUIwJTVEJTIwJTNEJTNEJTIwdG9rZW5pemVyLm1hc2tfdG9rZW5faWQpLm5vbnplcm8oKSU1QjAlNUQuaXRlbSgpJTBBcHJvYnMlMjAlM0QlMjBsb2dpdHMlNUIwJTJDJTIwbWFza2VkX2luZGV4JTVELnNvZnRtYXgoZGltJTNEMCklMEF2YWx1ZXMlMkMlMjBwcmVkaWN0aW9ucyUyMCUzRCUyMHByb2JzLnRvcGsoNSklMEElMEF0b2tlbml6ZXIuZGVjb2RlKHByZWRpY3Rpb25zKS5zcGxpdCgp",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Mask filling example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function yJ(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEElMEF0ZXh0JTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwY29vbCUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlMkMlMjBtYXhfbGVuZ3RoJTNEMTAyNCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQWVuY29kZXJfb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmVuY29kZSgqKmlucHV0cyk=",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function bJ(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEElMEF0ZXh0JTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwY29vbCUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlMkMlMjBtYXhfbGVuZ3RoJTNEMTAyNCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQWVuY29kZXJfb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmVuY29kZSgqKmlucHV0cyklMEElMEFkZWNvZGVyX3N0YXJ0X3Rva2VuX2lkJTIwJTNEJTIwbW9kZWwuY29uZmlnLmRlY29kZXJfc3RhcnRfdG9rZW5faWQlMEFkZWNvZGVyX2lucHV0X2lkcyUyMCUzRCUyMGpucC5vbmVzKChpbnB1dHMuaW5wdXRfaWRzLnNoYXBlJTVCMCU1RCUyQyUyMDEpJTJDJTIwZHR5cGUlM0QlMjJpNCUyMiklMjAqJTIwZGVjb2Rlcl9zdGFydF90b2tlbl9pZCUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbC5kZWNvZGUoZGVjb2Rlcl9pbnB1dF9pZHMlMkMlMjBlbmNvZGVyX291dHB1dHMpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function MJ(F){let l,b,f,h,y;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"),y=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 B=r(f);h=d(B,"Module"),B.forEach(t),y=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){_(n,l,u),e(l,b),e(l,f),e(f,h),e(l,y)},d(n){n&&t(l)}}}function TJ(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQW1vZGVsJTIwJTNEJTIwRmxheE1CYXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function vJ(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEElMEF0ZXh0JTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwY29vbCUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlMkMlMjBtYXhfbGVuZ3RoJTNEMTAyNCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQWVuY29kZXJfb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmVuY29kZSgqKmlucHV0cyk=",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function kJ(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEElMEF0ZXh0JTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwY29vbCUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlMkMlMjBtYXhfbGVuZ3RoJTNEMTAyNCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQWVuY29kZXJfb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmVuY29kZSgqKmlucHV0cyklMEElMEFkZWNvZGVyX3N0YXJ0X3Rva2VuX2lkJTIwJTNEJTIwbW9kZWwuY29uZmlnLmRlY29kZXJfc3RhcnRfdG9rZW5faWQlMEFkZWNvZGVyX2lucHV0X2lkcyUyMCUzRCUyMGpucC5vbmVzKChpbnB1dHMuaW5wdXRfaWRzLnNoYXBlJTVCMCU1RCUyQyUyMDEpJTJDJTIwZHR5cGUlM0QlMjJpNCUyMiklMjAqJTIwZGVjb2Rlcl9zdGFydF90b2tlbl9pZCUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbC5kZWNvZGUoZGVjb2Rlcl9pbnB1dF9pZHMlMkMlMjBlbmNvZGVyX291dHB1dHMpJTBBbGFzdF9kZWNvZGVyX2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function wJ(F){let l,b,f,h,y;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"),y=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 B=r(f);h=d(B,"Module"),B.forEach(t),y=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){_(n,l,u),e(l,b),e(l,f),e(f,h),e(l,y)},d(n){n&&t(l)}}}function JJ(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JRdWVzdGlvbkFuc3dlcmluZyUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydEZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLWNjMjUlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQXN0YXJ0X3Njb3JlcyUyMCUzRCUyMG91dHB1dHMuc3RhcnRfbG9naXRzJTBBZW5kX3Njb3JlcyUyMCUzRCUyMG91dHB1dHMuZW5kX2xvZ2l0cw==",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function FJ(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEElMEF0ZXh0JTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwY29vbCUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlMkMlMjBtYXhfbGVuZ3RoJTNEMTAyNCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQWVuY29kZXJfb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmVuY29kZSgqKmlucHV0cyk=",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function UJ(F){let l,b,f,h,y;return h=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TUJhcnRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1jYzI1JTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtY2MyNSUyMiklMEElMEF0ZXh0JTIwJTNEJTIwJTIyTXklMjBmcmllbmRzJTIwYXJlJTIwY29vbCUyMGJ1dCUyMHRoZXklMjBlYXQlMjB0b28lMjBtYW55JTIwY2FyYnMuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlMkMlMjBtYXhfbGVuZ3RoJTNEMTAyNCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQWVuY29kZXJfb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmVuY29kZSgqKmlucHV0cyklMEElMEFkZWNvZGVyX3N0YXJ0X3Rva2VuX2lkJTIwJTNEJTIwbW9kZWwuY29uZmlnLmRlY29kZXJfc3RhcnRfdG9rZW5faWQlMEFkZWNvZGVyX2lucHV0X2lkcyUyMCUzRCUyMGpucC5vbmVzKChpbnB1dHMuaW5wdXRfaWRzLnNoYXBlJTVCMCU1RCUyQyUyMDEpJTJDJTIwZHR5cGUlM0QlMjJpNCUyMiklMjAqJTIwZGVjb2Rlcl9zdGFydF90b2tlbl9pZCUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbC5kZWNvZGUoZGVjb2Rlcl9pbnB1dF9pZHMlMkMlMjBlbmNvZGVyX291dHB1dHMpJTBBbGFzdF9kZWNvZGVyX2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",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(),M(h.$$.fragment)},l(n){l=s(n,"P",{});var u=r(l);b=d(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,l,u),e(l,b),_(n,f,u),v(h,n,u),y=!0},p:q,i(n){y||(k(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(l),n&&t(f),J(h,n)}}}function jJ(F){let l,b,f,h,y,n,u,B,bt,ot,Y,Ie,he,z,Mt,ee,Ze,Wt,me,re,Ye,ve,Tt,ke,we,vt,nt,Q,fe,Qe,ie,Z,G,kt,ge,_e,wt,H,Jt,Ft,S,Ge,Je,at,de,Fe,Ue,Ut,le,je,Be,st,L,I,Oe,W,jt,Pe,U,$,D,De,Bt,Ht,E,zt,Lt,Kt,$t,eo,ce,pe,to,oo,ye,te,no,ze,xt,He,ao,dm,Bd,lm,cm,zd,pm,um,Wp,Fi,$d,hm,Np,Ia,Rp,Ui,Za,xd,mm,fm,so,gm,Ed,_m,ym,Cd,bm,Mm,Xp,Ga,Vp,ro,Yo,qd,Wa,Tm,Id,vm,Sp,Nt,km,Na,wm,Jm,Zd,Fm,Um,Ap,ji,jm,Yp,Bi,Gd,Bm,Qp,io,Qo,Wd,Ra,zm,Nd,$m,Op,rt,xm,Rd,Em,Cm,Xd,qm,Im,Vd,Zm,Gm,Pp,Oo,Wm,zi,Nm,Rm,Dp,$i,Sd,Xm,Hp,Xa,Lp,xi,Va,Ad,Vm,Sm,$e,Am,Yd,Ym,Qm,Qd,Om,Pm,Od,Dm,Hm,Pd,Lm,Km,Dd,ef,tf,Kp,Sa,eu,lo,Po,Hd,Aa,of,Ld,nf,tu,be,Kd,Ei,af,sf,el,Ci,rf,df,tl,qi,lf,cf,ol,Ii,pf,uf,nl,Zi,hf,mf,al,Gi,ff,ou,co,Do,sl,Ya,gf,rl,_f,nu,Le,Qa,yf,po,bf,Wi,Mf,Tf,Oa,vf,kf,wf,uo,Jf,Ni,Ff,Uf,Ri,jf,Bf,zf,Ho,au,ho,Lo,il,Pa,$f,dl,xf,su,ue,Da,Ef,ll,Cf,qf,Et,If,Xi,Zf,Gf,Vi,Wf,Nf,Ha,Rf,Xf,Vf,mo,Sf,cl,Af,Yf,pl,Qf,Of,Pf,Ko,Df,it,La,Hf,Ka,Lf,ul,Kf,eg,tg,es,ts,hl,og,ng,ml,ag,sg,os,fl,rg,ig,gl,dg,lg,_l,cg,ru,fo,en,yl,ns,pg,bl,ug,iu,N,as,hg,go,mg,Ml,fg,gg,ss,_g,yg,bg,rs,Mg,Si,Tg,vg,kg,_o,wg,Tl,Jg,Fg,vl,Ug,jg,Bg,tn,zg,We,is,$g,kl,xg,Eg,ds,Cg,wl,qg,Ig,Zg,ls,cs,Jl,Gg,Wg,Fl,Ng,Rg,ps,Ul,Xg,Vg,jl,Sg,Ag,Bl,Yg,Qg,on,us,Og,zl,Pg,Dg,nn,hs,Hg,$l,Lg,Kg,an,ms,e_,xl,t_,du,yo,sn,El,fs,o_,Cl,n_,lu,R,gs,a_,_s,s_,ys,r_,i_,d_,bs,l_,Ai,c_,p_,u_,rn,h_,dt,Ms,m_,Ts,f_,ql,g_,__,y_,vs,ks,Il,b_,M_,Zl,T_,v_,ws,Gl,k_,w_,Wl,J_,F_,Nl,U_,j_,dn,Js,B_,Rl,z_,$_,ln,Fs,x_,Us,E_,Xl,C_,q_,I_,cn,js,Z_,Vl,G_,W_,pn,Bs,N_,Sl,R_,cu,bo,un,Al,zs,X_,Yl,V_,pu,K,$s,S_,Mo,A_,Ql,Y_,Q_,xs,O_,P_,D_,Es,H_,Yi,L_,K_,ey,hn,ty,Ne,Cs,oy,Ol,ny,ay,qs,sy,Pl,ry,iy,dy,Is,Zs,Dl,ly,cy,Hl,py,uy,Gs,Ll,hy,my,Kl,fy,gy,ec,_y,yy,mn,Ws,by,tc,My,Ty,fn,Ns,vy,oc,ky,uu,To,gn,nc,Rs,wy,ac,Jy,hu,Ke,Xs,Fy,Vs,Uy,Qi,jy,By,zy,Ss,$y,As,xy,Ey,Cy,lt,Ys,qy,vo,Iy,Oi,Zy,Gy,sc,Wy,Ny,Ry,_n,Xy,yn,mu,ko,bn,rc,Qs,Vy,ic,Sy,fu,et,Os,Ay,Ps,Yy,Pi,Qy,Oy,Py,Ds,Dy,Hs,Hy,Ly,Ky,Re,Ls,eb,wo,tb,Di,ob,nb,dc,ab,sb,rb,Mn,ib,Tn,db,vn,gu,Jo,kn,lc,Ks,lb,cc,cb,_u,xe,er,pb,Fo,ub,pc,hb,mb,uc,fb,gb,_b,tr,yb,Hi,bb,Mb,Tb,or,vb,nr,kb,wb,Jb,ct,ar,Fb,Uo,Ub,Li,jb,Bb,hc,zb,$b,xb,wn,Eb,Jn,yu,jo,Fn,mc,sr,Cb,fc,qb,bu,Ee,rr,Ib,gc,Zb,Gb,ir,Wb,Ki,Nb,Rb,Xb,dr,Vb,lr,Sb,Ab,Yb,Xe,cr,Qb,Bo,Ob,ed,Pb,Db,_c,Hb,Lb,Kb,Un,eM,jn,tM,Bn,Mu,zo,zn,yc,pr,oM,bc,nM,Tu,$o,ur,aM,$n,hr,sM,xn,vu,xo,En,Mc,mr,rM,Tc,iM,ku,Ce,fr,dM,gr,lM,td,cM,pM,uM,_r,hM,yr,mM,fM,gM,Cn,_M,pt,br,yM,Eo,bM,od,MM,TM,vc,vM,kM,wM,qn,JM,In,wu,Co,Zn,kc,Mr,FM,wc,UM,Ju,qe,Tr,jM,vr,BM,nd,zM,$M,xM,kr,EM,wr,CM,qM,IM,Gn,ZM,Ve,Jr,GM,qo,WM,ad,NM,RM,Jc,XM,VM,SM,Wn,AM,Nn,YM,Rn,Fu,Io,Xn,Fc,Fr,QM,Uc,OM,Uu,O,Ur,PM,jr,DM,sd,HM,LM,KM,Br,eT,zr,tT,oT,nT,jc,aT,sT,Ct,Bc,$r,rT,iT,zc,xr,dT,lT,$c,Er,cT,pT,xc,Cr,uT,hT,ut,qr,mT,Zo,fT,Ec,gT,_T,Cc,yT,bT,MT,Vn,TT,Sn,vT,An,Ir,kT,Yn,wT,Qn,Zr,JT,On,ju,Go,Pn,qc,Gr,FT,Ic,UT,Bu,P,Wr,jT,Nr,BT,rd,zT,$T,xT,Rr,ET,Xr,CT,qT,IT,Zc,ZT,GT,qt,Gc,Vr,WT,NT,Wc,Sr,RT,XT,Nc,Ar,VT,ST,Rc,Yr,AT,YT,Se,Qr,QT,Wo,OT,Xc,PT,DT,Vc,HT,LT,KT,Dn,ev,Hn,tv,Ln,ov,Kn,Or,nv,ea,av,ta,Pr,sv,oa,zu,No,na,Sc,Dr,rv,Ac,iv,$u,X,Hr,dv,Yc,lv,cv,Lr,pv,id,uv,hv,mv,Kr,fv,ei,gv,_v,yv,Qc,bv,Mv,It,Oc,ti,Tv,vv,Pc,oi,kv,wv,Dc,ni,Jv,Fv,Hc,ai,Uv,jv,ht,si,Bv,Ro,zv,Lc,$v,xv,Kc,Ev,Cv,qv,aa,Iv,sa,Zv,ra,ri,Gv,ia,Wv,da,ii,Nv,la,xu,Xo,ca,ep,di,Rv,tp,Xv,Eu,V,li,Vv,Vo,Sv,op,Av,Yv,np,Qv,Ov,Pv,ci,Dv,dd,Hv,Lv,Kv,pi,ek,ui,tk,ok,nk,ap,ak,sk,Zt,sp,hi,rk,ik,rp,mi,dk,lk,ip,fi,ck,pk,dp,gi,uk,hk,mt,_i,mk,So,fk,lp,gk,_k,cp,yk,bk,Mk,pa,Tk,ua,vk,ha,yi,kk,ma,wk,fa,bi,Jk,ga,Cu;return n=new A({}),ie=new A({}),W=new A({}),Ia=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1CYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTJDJTIwTUJhcnRUb2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBNQmFydFRva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1lbi1ybyUyMiUyQyUyMHNyY19sYW5nJTNEJTIyZW5fWFglMjIlMkMlMjB0Z3RfbGFuZyUzRCUyMnJvX1JPJTIyKSUwQWV4YW1wbGVfZW5nbGlzaF9waHJhc2UlMjAlM0QlMjAlMjJVTiUyMENoaWVmJTIwU2F5cyUyMFRoZXJlJTIwSXMlMjBObyUyME1pbGl0YXJ5JTIwU29sdXRpb24lMjBpbiUyMFN5cmlhJTIyJTBBZXhwZWN0ZWRfdHJhbnNsYXRpb25fcm9tYW5pYW4lMjAlM0QlMjAlMjIlQzUlOUVlZnVsJTIwT05VJTIwZGVjbGFyJUM0JTgzJTIwYyVDNCU4MyUyMG51JTIwZXhpc3QlQzQlODMlMjBvJTIwc29sdSVDNSVBM2llJTIwbWlsaXRhciVDNCU4MyUyMCVDMyVBRW4lMjBTaXJpYSUyMiUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihleGFtcGxlX2VuZ2xpc2hfcGhyYXNlJTJDJTIwdGV4dF90YXJnZXQlM0RleHBlY3RlZF90cmFuc2xhdGlvbl9yb21hbmlhbiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBbW9kZWwlMjAlM0QlMjBNQmFydEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1lbi1ybyUyMiklMEElMjMlMjBmb3J3YXJkJTIwcGFzcyUwQW1vZGVsKCoqaW5wdXRzKQ==",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)`}}),Ga=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1CYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTJDJTIwTUJhcnRUb2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBNQmFydFRva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtYmFydC1sYXJnZS1lbi1ybyUyMiUyQyUyMHNyY19sYW5nJTNEJTIyZW5fWFglMjIpJTBBYXJ0aWNsZSUyMCUzRCUyMCUyMlVOJTIwQ2hpZWYlMjBTYXlzJTIwVGhlcmUlMjBJcyUyME5vJTIwTWlsaXRhcnklMjBTb2x1dGlvbiUyMGluJTIwU3lyaWElMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoYXJ0aWNsZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBdHJhbnNsYXRlZF90b2tlbnMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmlucHV0cyUyQyUyMGRlY29kZXJfc3RhcnRfdG9rZW5faWQlM0R0b2tlbml6ZXIubGFuZ19jb2RlX3RvX2lkJTVCJTIycm9fUk8lMjIlNUQpJTBBdG9rZW5pemVyLmJhdGNoX2RlY29kZSh0cmFuc2xhdGVkX3Rva2VucyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKSU1QjAlNUQ=",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>`}}),Wa=new A({}),Ra=new A({}),Xa=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1CYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTJDJTIwTUJhcnQ1MFRva2VuaXplckZhc3QlMEElMEFtb2RlbCUyMCUzRCUyME1CYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLTUwJTIyKSUwQXRva2VuaXplciUyMCUzRCUyME1CYXJ0NTBUb2tlbml6ZXJGYXN0LmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLTUwJTIyJTJDJTIwc3JjX2xhbmclM0QlMjJlbl9YWCUyMiUyQyUyMHRndF9sYW5nJTNEJTIycm9fUk8lMjIpJTBBJTBBc3JjX3RleHQlMjAlM0QlMjAlMjIlMjBVTiUyMENoaWVmJTIwU2F5cyUyMFRoZXJlJTIwSXMlMjBObyUyME1pbGl0YXJ5JTIwU29sdXRpb24lMjBpbiUyMFN5cmlhJTIyJTBBdGd0X3RleHQlMjAlM0QlMjAlMjIlQzUlOUVlZnVsJTIwT05VJTIwZGVjbGFyJUM0JTgzJTIwYyVDNCU4MyUyMG51JTIwZXhpc3QlQzQlODMlMjBvJTIwc29sdSVDNSVBM2llJTIwbWlsaXRhciVDNCU4MyUyMCVDMyVBRW4lMjBTaXJpYSUyMiUwQSUwQW1vZGVsX2lucHV0cyUyMCUzRCUyMHRva2VuaXplcihzcmNfdGV4dCUyQyUyMHRleHRfdGFyZ2V0JTNEdGd0X3RleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQW1vZGVsKCoqbW9kZWxfaW5wdXRzKSUyMCUyMCUyMyUyMGZvcndhcmQlMjBwYXNz",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>`}}),Sa=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1CYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTJDJTIwTUJhcnQ1MFRva2VuaXplckZhc3QlMEElMEFhcnRpY2xlX2hpJTIwJTNEJTIwJTIyJUUwJUE0JUI4JUUwJUE0JTgyJUUwJUE0JUFGJUUwJUE1JTgxJUUwJUE0JTk1JUUwJUE1JThEJUUwJUE0JUE0JTIwJUUwJUE0JUIwJUUwJUE0JUJFJUUwJUE0JUI3JUUwJUE1JThEJUUwJUE0JTlGJUUwJUE1JThEJUUwJUE0JUIwJTIwJUUwJUE0JTk1JUUwJUE1JTg3JTIwJUUwJUE0JUFBJUUwJUE1JThEJUUwJUE0JUIwJUUwJUE0JUFFJUUwJUE1JTgxJUUwJUE0JTk2JTIwJUUwJUE0JTk1JUUwJUE0JUJFJTIwJUUwJUE0JTk1JUUwJUE0JUI5JUUwJUE0JUE4JUUwJUE0JUJFJTIwJUUwJUE0JUI5JUUwJUE1JTg4JTIwJUUwJUE0JTk1JUUwJUE0JUJGJTIwJUUwJUE0JUI4JUUwJUE1JTgwJUUwJUE0JUIwJUUwJUE0JUJGJUUwJUE0JUFGJUUwJUE0JUJFJTIwJUUwJUE0JUFFJUUwJUE1JTg3JUUwJUE0JTgyJTIwJUUwJUE0JTk1JUUwJUE1JThCJUUwJUE0JTg4JTIwJUUwJUE0JUI4JUUwJUE1JTg4JUUwJUE0JUE4JUUwJUE1JThEJUUwJUE0JUFGJTIwJUUwJUE0JUI4JUUwJUE0JUFFJUUwJUE0JUJFJUUwJUE0JUE3JUUwJUE0JUJFJUUwJUE0JUE4JTIwJUUwJUE0JUE4JUUwJUE0JUI5JUUwJUE1JTgwJUUwJUE0JTgyJTIwJUUwJUE0JUI5JUUwJUE1JTg4JTIyJTBBYXJ0aWNsZV9hciUyMCUzRCUyMCUyMiVEOCVBNyVEOSU4NCVEOCVBMyVEOSU4NSVEOSU4QSVEOSU4NiUyMCVEOCVBNyVEOSU4NCVEOCVCOSVEOCVBNyVEOSU4NSUyMCVEOSU4NCVEOSU4NCVEOCVBMyVEOSU4NSVEOSU4NSUyMCVEOCVBNyVEOSU4NCVEOSU4NSVEOCVBQSVEOCVBRCVEOCVBRiVEOCVBOSUyMCVEOSU4QSVEOSU4MiVEOSU4OCVEOSU4NCUyMCVEOCVBNSVEOSU4NiVEOSU4NyUyMCVEOSU4NCVEOCVBNyUyMCVEOSU4QSVEOSU4OCVEOCVBQyVEOCVBRiUyMCVEOCVBRCVEOSU4NCUyMCVEOCVCOSVEOCVCMyVEOSU4MyVEOCVCMSVEOSU4QSUyMCVEOSU4MSVEOSU4QSUyMCVEOCVCMyVEOSU4OCVEOCVCMSVEOSU4QSVEOCVBNy4lMjIlMEElMEFtb2RlbCUyMCUzRCUyME1CYXJ0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1iYXJ0LWxhcmdlLTUwLW1hbnktdG8tbWFueS1tbXQlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwTUJhcnQ1MFRva2VuaXplckZhc3QuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbWJhcnQtbGFyZ2UtNTAtbWFueS10by1tYW55LW1tdCUyMiklMEElMEElMjMlMjB0cmFuc2xhdGUlMjBIaW5kaSUyMHRvJTIwRnJlbmNoJTBBdG9rZW5pemVyLnNyY19sYW5nJTIwJTNEJTIwJTIyaGlfSU4lMjIlMEFlbmNvZGVkX2hpJTIwJTNEJTIwdG9rZW5pemVyKGFydGljbGVfaGklMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQWdlbmVyYXRlZF90b2tlbnMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmVuY29kZWRfaGklMkMlMjBmb3JjZWRfYm9zX3Rva2VuX2lkJTNEdG9rZW5pemVyLmxhbmdfY29kZV90b19pZCU1QiUyMmZyX1hYJTIyJTVEKSUwQXRva2VuaXplci5iYXRjaF9kZWNvZGUoZ2VuZXJhdGVkX3Rva2VucyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKSUwQSUyMyUyMCUzRCUzRSUyMCUyMkxlJTIwY2hlZiUyMGRlJTIwbCUyMCdPTlUlMjBhZmZpcm1lJTIwcXUlMjAnaWwlMjBuJTIwJ3klMjBhJTIwcGFzJTIwZGUlMjBzb2x1dGlvbiUyMG1pbGl0YWlyZSUyMGVuJTIwU3lyaWEuJTIyJTBBJTBBJTIzJTIwdHJhbnNsYXRlJTIwQXJhYmljJTIwdG8lMjBFbmdsaXNoJTBBdG9rZW5pemVyLnNyY19sYW5nJTIwJTNEJTIwJTIyYXJfQVIlMjIlMEFlbmNvZGVkX2FyJTIwJTNEJTIwdG9rZW5pemVyKGFydGljbGVfYXIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQWdlbmVyYXRlZF90b2tlbnMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmVuY29kZWRfYXIlMkMlMjBmb3JjZWRfYm9zX3Rva2VuX2lkJTNEdG9rZW5pemVyLmxhbmdfY29kZV90b19pZCU1QiUyMmVuX1hYJTIyJTVEKSUwQXRva2VuaXplci5iYXRjaF9kZWNvZGUoZ2VuZXJhdGVkX3Rva2VucyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKSUwQSUyMyUyMCUzRCUzRSUyMCUyMlRoZSUyMFNlY3JldGFyeS1HZW5lcmFsJTIwb2YlMjB0aGUlMjBVbml0ZWQlMjBOYXRpb25zJTIwc2F5cyUyMHRoZXJlJTIwaXMlMjBubyUyMG1pbGl0YXJ5JTIwc29sdXRpb24lMjBpbiUyMFN5cmlhLiUyMg==",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>`}}),Aa=new A({}),Ya=new A({}),Qa=new j({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.30.0/en/model_doc/mbart#transformers.MBartModel">MBartModel</a> or <a href="/docs/transformers/v4.30.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.30.0/src/transformers/models/mbart/configuration_mbart.py#L34"}}),Ho=new C({props:{anchor:"transformers.MBartConfig.example",$$slots:{default:[X1]},$$scope:{ctx:F}}}),Pa=new A({}),Da=new j({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.30.0/src/transformers/models/mbart/tokenization_mbart.py#L53"}}),Ko=new C({props:{anchor:"transformers.MBartTokenizer.example",$$slots:{default:[V1]},$$scope:{ctx:F}}}),La=new j({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.30.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 A({}),as=new j({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.30.0/src/transformers/models/mbart/tokenization_mbart_fast.py#L63"}}),tn=new C({props:{anchor:"transformers.MBartTokenizerFast.example",$$slots:{default:[S1]},$$scope:{ctx:F}}}),is=new j({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.30.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 j({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.30.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 j({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.30.0/src/transformers/models/mbart/tokenization_mbart_fast.py#L245"}}),ms=new j({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.30.0/src/transformers/models/mbart/tokenization_mbart_fast.py#L260"}}),fs=new A({}),gs=new j({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.30.0/src/transformers/models/mbart50/tokenization_mbart50.py#L49"}}),rn=new C({props:{anchor:"transformers.MBart50Tokenizer.example",$$slots:{default:[A1]},$$scope:{ctx:F}}}),Ms=new j({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.30.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>
`}}),Js=new j({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.30.0/src/transformers/models/mbart50/tokenization_mbart50.py#L235"}}),Fs=new j({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.30.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>
`}}),js=new j({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.30.0/src/transformers/models/mbart50/tokenization_mbart50.py#L358"}}),Bs=new j({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.30.0/src/transformers/models/mbart50/tokenization_mbart50.py#L364"}}),zs=new A({}),$s=new j({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.30.0/src/transformers/models/mbart50/tokenization_mbart50_fast.py#L59"}}),hn=new C({props:{anchor:"transformers.MBart50TokenizerFast.example",$$slots:{default:[Y1]},$$scope:{ctx:F}}}),Cs=new j({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.30.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>
`}}),Ws=new j({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.30.0/src/transformers/models/mbart50/tokenization_mbart50_fast.py#L217"}}),Ns=new j({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.30.0/src/transformers/models/mbart50/tokenization_mbart50_fast.py#L232"}}),Rs=new A({}),Xs=new j({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.30.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.30.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.30.0/src/transformers/models/mbart/modeling_mbart.py#L1153"}}),Ys=new j({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/mbart/modeling_mbart.py#L1182",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_n=new yt({props:{$$slots:{default:[Q1]},$$scope:{ctx:F}}}),yn=new C({props:{anchor:"transformers.MBartModel.forward.example",$$slots:{default:[O1]},$$scope:{ctx:F}}}),Qs=new A({}),Os=new j({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.30.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.30.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.30.0/src/transformers/models/mbart/modeling_mbart.py#L1272"}}),Ls=new j({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/mbart/modeling_mbart.py#L1318",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Mn=new yt({props:{$$slots:{default:[P1]},$$scope:{ctx:F}}}),Tn=new C({props:{anchor:"transformers.MBartForConditionalGeneration.forward.example",$$slots:{default:[D1]},$$scope:{ctx:F}}}),vn=new C({props:{anchor:"transformers.MBartForConditionalGeneration.forward.example-2",$$slots:{default:[H1]},$$scope:{ctx:F}}}),Ks=new A({}),er=new j({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.30.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.30.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.30.0/src/transformers/models/mbart/modeling_mbart.py#L1576"}}),ar=new j({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/mbart/modeling_mbart.py#L1591",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqQuestionAnsweringModelOutput"
>transformers.modeling_outputs.Seq2SeqQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),wn=new yt({props:{$$slots:{default:[L1]},$$scope:{ctx:F}}}),Jn=new C({props:{anchor:"transformers.MBartForQuestionAnswering.forward.example",$$slots:{default:[K1]},$$scope:{ctx:F}}}),sr=new A({}),rr=new j({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.30.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.30.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.30.0/src/transformers/models/mbart/modeling_mbart.py#L1447"}}),cr=new j({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/mbart/modeling_mbart.py#L1463",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqSequenceClassifierOutput"
>transformers.modeling_outputs.Seq2SeqSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Un=new yt({props:{$$slots:{default:[eJ]},$$scope:{ctx:F}}}),jn=new C({props:{anchor:"transformers.MBartForSequenceClassification.forward.example",$$slots:{default:[tJ]},$$scope:{ctx:F}}}),Bn=new C({props:{anchor:"transformers.MBartForSequenceClassification.forward.example-2",$$slots:{default:[oJ]},$$scope:{ctx:F}}}),pr=new A({}),ur=new j({props:{name:"class transformers.MBartForCausalLM",anchor:"transformers.MBartForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/mbart/modeling_mbart.py#L1709"}}),hr=new j({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/mbart/modeling_mbart.py#L1742",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),xn=new C({props:{anchor:"transformers.MBartForCausalLM.forward.example",$$slots:{default:[nJ]},$$scope:{ctx:F}}}),mr=new A({}),fr=new j({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.30.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.30.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.30.0/src/transformers/models/mbart/modeling_tf_mbart.py#L1162"}}),Cn=new yt({props:{$$slots:{default:[aJ]},$$scope:{ctx:F}}}),br=new j({props:{name:"call",anchor:"transformers.TFMBartModel.call",parameters:[{name:"input_ids",val:": TFModelInputType = None"},{name:"attention_mask",val:": tf.Tensor | None = None"},{name:"decoder_input_ids",val:": tf.Tensor | None = None"},{name:"decoder_attention_mask",val:": tf.Tensor | None = None"},{name:"decoder_position_ids",val:": tf.Tensor | None = None"},{name:"head_mask",val:": tf.Tensor | None = None"},{name:"decoder_head_mask",val:": tf.Tensor | None = None"},{name:"cross_attn_head_mask",val:": tf.Tensor | None = None"},{name:"encoder_outputs",val:": Optional[Union[Tuple, TFBaseModelOutput]] = None"},{name:"past_key_values",val:": Tuple[Tuple[tf.Tensor]] | None = None"},{name:"inputs_embeds",val:": tf.Tensor | None = None"},{name:"decoder_inputs_embeds",val:": tf.Tensor | None = None"},{name:"use_cache",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": 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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/mbart/modeling_tf_mbart.py#L1174",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),qn=new yt({props:{$$slots:{default:[sJ]},$$scope:{ctx:F}}}),In=new C({props:{anchor:"transformers.TFMBartModel.call.example",$$slots:{default:[rJ]},$$scope:{ctx:F}}}),Mr=new A({}),Tr=new j({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.30.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.30.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.30.0/src/transformers/models/mbart/modeling_tf_mbart.py#L1267"}}),Gn=new yt({props:{$$slots:{default:[iJ]},$$scope:{ctx:F}}}),Jr=new j({props:{name:"call",anchor:"transformers.TFMBartForConditionalGeneration.call",parameters:[{name:"input_ids",val:": TFModelInputType = None"},{name:"attention_mask",val:": tf.Tensor | None = None"},{name:"decoder_input_ids",val:": tf.Tensor | None = None"},{name:"decoder_attention_mask",val:": tf.Tensor | None = None"},{name:"decoder_position_ids",val:": tf.Tensor | None = None"},{name:"head_mask",val:": tf.Tensor | None = None"},{name:"decoder_head_mask",val:": tf.Tensor | None = None"},{name:"cross_attn_head_mask",val:": tf.Tensor | None = None"},{name:"encoder_outputs",val:": Optional[TFBaseModelOutput] = None"},{name:"past_key_values",val:": Tuple[Tuple[tf.Tensor]] = None"},{name:"inputs_embeds",val:": tf.Tensor | None = None"},{name:"decoder_inputs_embeds",val:": tf.Tensor | None = None"},{name:"use_cache",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": tf.Tensor | None = None"},{name:"training",val:": 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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/mbart/modeling_tf_mbart.py#L1305",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Wn=new yt({props:{$$slots:{default:[dJ]},$$scope:{ctx:F}}}),Nn=new C({props:{anchor:"transformers.TFMBartForConditionalGeneration.call.example",$$slots:{default:[lJ]},$$scope:{ctx:F}}}),Rn=new C({props:{anchor:"transformers.TFMBartForConditionalGeneration.call.example-2",$$slots:{default:[cJ]},$$scope:{ctx:F}}}),Fr=new A({}),Ur=new j({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.30.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.30.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.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1276"}}),qr=new j({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1213",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Vn=new yt({props:{$$slots:{default:[pJ]},$$scope:{ctx:F}}}),Sn=new C({props:{anchor:"transformers.FlaxMBartModel.__call__.example",$$slots:{default:[uJ]},$$scope:{ctx:F}}}),Ir=new j({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1037",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Yn=new C({props:{anchor:"transformers.FlaxMBartModel.encode.example",$$slots:{default:[hJ]},$$scope:{ctx:F}}}),Zr=new j({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1100",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),On=new C({props:{anchor:"transformers.FlaxMBartModel.decode.example",$$slots:{default:[mJ]},$$scope:{ctx:F}}}),Gr=new A({}),Wr=new j({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.30.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.30.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.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1361"}}),Qr=new j({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1213",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Dn=new yt({props:{$$slots:{default:[fJ]},$$scope:{ctx:F}}}),Hn=new C({props:{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.example",$$slots:{default:[gJ]},$$scope:{ctx:F}}}),Ln=new C({props:{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.example-2",$$slots:{default:[_J]},$$scope:{ctx:F}}}),Or=new j({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1037",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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 C({props:{anchor:"transformers.FlaxMBartForConditionalGeneration.encode.example",$$slots:{default:[yJ]},$$scope:{ctx:F}}}),Pr=new j({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1365",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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 C({props:{anchor:"transformers.FlaxMBartForConditionalGeneration.decode.example",$$slots:{default:[bJ]},$$scope:{ctx:F}}}),Dr=new A({}),Hr=new j({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.30.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.30.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.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1674"}}),si=new j({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1213",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.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 yt({props:{$$slots:{default:[MJ]},$$scope:{ctx:F}}}),sa=new C({props:{anchor:"transformers.FlaxMBartForSequenceClassification.__call__.example",$$slots:{default:[TJ]},$$scope:{ctx:F}}}),ri=new j({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1037",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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 C({props:{anchor:"transformers.FlaxMBartForSequenceClassification.encode.example",$$slots:{default:[vJ]},$$scope:{ctx:F}}}),ii=new j({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1100",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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 C({props:{anchor:"transformers.FlaxMBartForSequenceClassification.decode.example",$$slots:{default:[kJ]},$$scope:{ctx:F}}}),di=new A({}),li=new j({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.30.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.30.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.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1761"}}),_i=new j({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1213",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.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 yt({props:{$$slots:{default:[wJ]},$$scope:{ctx:F}}}),ua=new C({props:{anchor:"transformers.FlaxMBartForQuestionAnswering.__call__.example",$$slots:{default:[JJ]},$$scope:{ctx:F}}}),yi=new j({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1037",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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 C({props:{anchor:"transformers.FlaxMBartForQuestionAnswering.encode.example",$$slots:{default:[FJ]},$$scope:{ctx:F}}}),bi=new j({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/mbart/modeling_flax_mbart.py#L1100",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ga=new C({props:{anchor:"transformers.FlaxMBartForQuestionAnswering.decode.example",$$slots:{default:[UJ]},$$scope:{ctx:F}}}),{c(){l=a("meta"),b=c(),f=a("h1"),h=a("a"),y=a("span"),M(n.$$.fragment),u=c(),B=a("span"),bt=i("MBart and MBart-50"),ot=c(),Y=a("div"),Ie=a("a"),he=a("img"),Mt=c(),ee=a("a"),Ze=a("img"),me=c(),re=a("p"),Ye=a("strong"),ve=i("DISCLAIMER:"),Tt=i(" If you see something strange, file a "),ke=a("a"),we=i("Github Issue"),vt=i(` and assign
@patrickvonplaten`),nt=c(),Q=a("h2"),fe=a("a"),Qe=a("span"),M(ie.$$.fragment),Z=c(),G=a("span"),kt=i("Overview of MBart"),ge=c(),_e=a("p"),wt=i("The MBart model was presented in "),H=a("a"),Jt=i("Multilingual Denoising Pre-training for Neural Machine Translation"),Ft=i(` by Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov Marjan
Ghazvininejad, Mike Lewis, Luke Zettlemoyer.`),S=c(),Ge=a("p"),Je=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"),Fe=i("This model was contributed by "),Ue=a("a"),Ut=i("valhalla"),le=i(". The Authors\u2019 code can be found "),je=a("a"),Be=i("here"),st=c(),L=a("h3"),I=a("a"),Oe=a("span"),M(W.$$.fragment),jt=c(),Pe=a("span"),U=i("Training of MBart"),$=c(),D=a("p"),De=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 `),Bt=a("code"),Ht=i("X [eos, src_lang_code]"),E=i(" where "),zt=a("code"),Lt=i("X"),Kt=i(` is the source text. The
target text format is `),$t=a("code"),eo=i("[tgt_lang_code] X [eos]"),ce=i(". "),pe=a("code"),to=i("bos"),oo=i(" is never used."),ye=c(),te=a("p"),no=i("The regular "),ze=a("a"),xt=a("strong"),He=i("call"),ao=i("()"),dm=i(" will encode source text format passed as first argument or with the "),Bd=a("code"),lm=i("text"),cm=i(`
keyword, and target text format passed with the `),zd=a("code"),pm=i("text_label"),um=i(" keyword argument."),Wp=c(),Fi=a("ul"),$d=a("li"),hm=i("Supervised training"),Np=c(),M(Ia.$$.fragment),Rp=c(),Ui=a("ul"),Za=a("li"),xd=a("p"),mm=i("Generation"),fm=c(),so=a("p"),gm=i("While generating the target text set the "),Ed=a("code"),_m=i("decoder_start_token_id"),ym=i(` to the target language id. The following
example shows how to translate English to Romanian using the `),Cd=a("em"),bm=i("facebook/mbart-large-en-ro"),Mm=i(" model."),Xp=c(),M(Ga.$$.fragment),Vp=c(),ro=a("h2"),Yo=a("a"),qd=a("span"),M(Wa.$$.fragment),Tm=c(),Id=a("span"),vm=i("Overview of MBart-50"),Sp=c(),Nt=a("p"),km=i("MBart-50 was introduced in the "),Na=a("a"),wm=i("Multilingual Translation with Extensible Multilingual Pretraining and Finetuning"),Jm=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 `),Zd=a("em"),Fm=i("mbart-large-cc25"),Um=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.`),Ap=c(),ji=a("p"),jm=i("According to the abstract"),Yp=c(),Bi=a("p"),Gd=a("em"),Bm=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"),Wd=a("span"),M(Ra.$$.fragment),zm=c(),Nd=a("span"),$m=i("Training of MBart-50"),Op=c(),rt=a("p"),xm=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 `),Rd=a("code"),Em=i("[lang_code] X [eos]"),Cm=i(", where "),Xd=a("code"),qm=i("lang_code"),Im=i(` is source
language id for source text and target language id for target text, with `),Vd=a("code"),Zm=i("X"),Gm=i(` being the source or target text
respectively.`),Pp=c(),Oo=a("p"),Wm=i("MBart-50 has its own tokenizer "),zi=a("a"),Nm=i("MBart50Tokenizer"),Rm=i("."),Dp=c(),$i=a("ul"),Sd=a("li"),Xm=i("Supervised training"),Hp=c(),M(Xa.$$.fragment),Lp=c(),xi=a("ul"),Va=a("li"),Ad=a("p"),Vm=i("Generation"),Sm=c(),$e=a("p"),Am=i("To generate using the mBART-50 multilingual translation models, "),Yd=a("code"),Ym=i("eos_token_id"),Qm=i(` is used as the
`),Qd=a("code"),Om=i("decoder_start_token_id"),Pm=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 `),Od=a("em"),Dm=i("forced_bos_token_id"),Hm=i(" parameter to the "),Pd=a("em"),Lm=i("generate"),Km=i(` method.
The following example shows how to translate between Hindi to French and Arabic to English using the
`),Dd=a("em"),ef=i("facebook/mbart-50-large-many-to-many"),tf=i(" checkpoint."),Kp=c(),M(Sa.$$.fragment),eu=c(),lo=a("h2"),Po=a("a"),Hd=a("span"),M(Aa.$$.fragment),of=c(),Ld=a("span"),nf=i("Documentation resources"),tu=c(),be=a("ul"),Kd=a("li"),Ei=a("a"),af=i("Text classification task guide"),sf=c(),el=a("li"),Ci=a("a"),rf=i("Question answering task guide"),df=c(),tl=a("li"),qi=a("a"),lf=i("Causal language modeling task guide"),cf=c(),ol=a("li"),Ii=a("a"),pf=i("Masked language modeling task guide"),uf=c(),nl=a("li"),Zi=a("a"),hf=i("Translation task guide"),mf=c(),al=a("li"),Gi=a("a"),ff=i("Summarization task guide"),ou=c(),co=a("h2"),Do=a("a"),sl=a("span"),M(Ya.$$.fragment),gf=c(),rl=a("span"),_f=i("MBartConfig"),nu=c(),Le=a("div"),M(Qa.$$.fragment),yf=c(),po=a("p"),bf=i("This is the configuration class to store the configuration of a "),Wi=a("a"),Mf=i("MBartModel"),Tf=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
`),Oa=a("a"),vf=i("facebook/mbart-large-cc25"),kf=i(" architecture."),wf=c(),uo=a("p"),Jf=i("Configuration objects inherit from "),Ni=a("a"),Ff=i("PretrainedConfig"),Uf=i(` and can be used to control the model outputs. Read the
documentation from `),Ri=a("a"),jf=i("PretrainedConfig"),Bf=i(" for more information."),zf=c(),M(Ho.$$.fragment),au=c(),ho=a("h2"),Lo=a("a"),il=a("span"),M(Pa.$$.fragment),$f=c(),dl=a("span"),xf=i("MBartTokenizer"),su=c(),ue=a("div"),M(Da.$$.fragment),Ef=c(),ll=a("p"),Cf=i("Construct an MBART tokenizer."),qf=c(),Et=a("p"),If=i("Adapted from "),Xi=a("a"),Zf=i("RobertaTokenizer"),Gf=i(" and "),Vi=a("a"),Wf=i("XLNetTokenizer"),Nf=i(`. Based on
`),Ha=a("a"),Rf=i("SentencePiece"),Xf=i("."),Vf=c(),mo=a("p"),Sf=i("The tokenization method is "),cl=a("code"),Af=i("<tokens> <eos> <language code>"),Yf=i(" for source language documents, and "),pl=a("code"),Qf=i("<language code> <tokens> <eos>"),Of=i(" for target language documents."),Pf=c(),M(Ko.$$.fragment),Df=c(),it=a("div"),M(La.$$.fragment),Hf=c(),Ka=a("p"),Lf=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"),Kf=i("X"),eg=i(" represents the sequence:"),tg=c(),es=a("ul"),ts=a("li"),hl=a("code"),og=i("input_ids"),ng=i(" (for encoder) "),ml=a("code"),ag=i("X [eos, src_lang_code]"),sg=c(),os=a("li"),fl=a("code"),rg=i("decoder_input_ids"),ig=i(": (for decoder) "),gl=a("code"),dg=i("X [eos, tgt_lang_code]"),lg=c(),_l=a("p"),cg=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"),yl=a("span"),M(ns.$$.fragment),pg=c(),bl=a("span"),ug=i("MBartTokenizerFast"),iu=c(),N=a("div"),M(as.$$.fragment),hg=c(),go=a("p"),mg=i("Construct a \u201Cfast\u201D MBART tokenizer (backed by HuggingFace\u2019s "),Ml=a("em"),fg=i("tokenizers"),gg=i(` library). Based on
`),ss=a("a"),_g=i("BPE"),yg=i("."),bg=c(),rs=a("p"),Mg=i("This tokenizer inherits from "),Si=a("a"),Tg=i("PreTrainedTokenizerFast"),vg=i(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),kg=c(),_o=a("p"),wg=i("The tokenization method is "),Tl=a("code"),Jg=i("<tokens> <eos> <language code>"),Fg=i(" for source language documents, and "),vl=a("code"),Ug=i("<language code> <tokens> <eos>"),jg=i(" for target language documents."),Bg=c(),M(tn.$$.fragment),zg=c(),We=a("div"),M(is.$$.fragment),$g=c(),kl=a("p"),xg=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.`),Eg=c(),ds=a("p"),Cg=i("An MBART sequence has the following format, where "),wl=a("code"),qg=i("X"),Ig=i(" represents the sequence:"),Zg=c(),ls=a("ul"),cs=a("li"),Jl=a("code"),Gg=i("input_ids"),Wg=i(" (for encoder) "),Fl=a("code"),Ng=i("X [eos, src_lang_code]"),Rg=c(),ps=a("li"),Ul=a("code"),Xg=i("decoder_input_ids"),Vg=i(": (for decoder) "),jl=a("code"),Sg=i("X [eos, tgt_lang_code]"),Ag=c(),Bl=a("p"),Yg=i(`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),Qg=c(),on=a("div"),M(us.$$.fragment),Og=c(),zl=a("p"),Pg=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.`),Dg=c(),nn=a("div"),M(hs.$$.fragment),Hg=c(),$l=a("p"),Lg=i("Reset the special tokens to the source lang setting. No prefix and suffix=[eos, src_lang_code]."),Kg=c(),an=a("div"),M(ms.$$.fragment),e_=c(),xl=a("p"),t_=i("Reset the special tokens to the target language setting. No prefix and suffix=[eos, tgt_lang_code]."),du=c(),yo=a("h2"),sn=a("a"),El=a("span"),M(fs.$$.fragment),o_=c(),Cl=a("span"),n_=i("MBart50Tokenizer"),lu=c(),R=a("div"),M(gs.$$.fragment),a_=c(),_s=a("p"),s_=i("Construct a MBart50 tokenizer. Based on "),ys=a("a"),r_=i("SentencePiece"),i_=i("."),d_=c(),bs=a("p"),l_=i("This tokenizer inherits from "),Ai=a("a"),c_=i("PreTrainedTokenizer"),p_=i(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),u_=c(),M(rn.$$.fragment),h_=c(),dt=a("div"),M(Ms.$$.fragment),m_=c(),Ts=a("p"),f_=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 `),ql=a("code"),g_=i("X"),__=i(" represents the sequence:"),y_=c(),vs=a("ul"),ks=a("li"),Il=a("code"),b_=i("input_ids"),M_=i(" (for encoder) "),Zl=a("code"),T_=i("[src_lang_code] X [eos]"),v_=c(),ws=a("li"),Gl=a("code"),k_=i("labels"),w_=i(": (for decoder) "),Wl=a("code"),J_=i("[tgt_lang_code] X [eos]"),F_=c(),Nl=a("p"),U_=i(`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),j_=c(),dn=a("div"),M(Js.$$.fragment),B_=c(),Rl=a("p"),z_=i("Converts a sequence of tokens (string) in a single string."),$_=c(),ln=a("div"),M(Fs.$$.fragment),x_=c(),Us=a("p"),E_=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 `),Xl=a("code"),C_=i("prepare_for_model"),q_=i(" method."),I_=c(),cn=a("div"),M(js.$$.fragment),Z_=c(),Vl=a("p"),G_=i("Reset the special tokens to the source lang setting. prefix=[src_lang_code] and suffix=[eos]."),W_=c(),pn=a("div"),M(Bs.$$.fragment),N_=c(),Sl=a("p"),R_=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"),Al=a("span"),M(zs.$$.fragment),X_=c(),Yl=a("span"),V_=i("MBart50TokenizerFast"),pu=c(),K=a("div"),M($s.$$.fragment),S_=c(),Mo=a("p"),A_=i("Construct a \u201Cfast\u201D MBART tokenizer for mBART-50 (backed by HuggingFace\u2019s "),Ql=a("em"),Y_=i("tokenizers"),Q_=i(` library). Based on
`),xs=a("a"),O_=i("BPE"),P_=i("."),D_=c(),Es=a("p"),H_=i("This tokenizer inherits from "),Yi=a("a"),L_=i("PreTrainedTokenizerFast"),K_=i(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),ey=c(),M(hn.$$.fragment),ty=c(),Ne=a("div"),M(Cs.$$.fragment),oy=c(),Ol=a("p"),ny=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.`),ay=c(),qs=a("p"),sy=i("An MBART-50 sequence has the following format, where "),Pl=a("code"),ry=i("X"),iy=i(" represents the sequence:"),dy=c(),Is=a("ul"),Zs=a("li"),Dl=a("code"),ly=i("input_ids"),cy=i(" (for encoder) "),Hl=a("code"),py=i("[src_lang_code] X [eos]"),uy=c(),Gs=a("li"),Ll=a("code"),hy=i("labels"),my=i(": (for decoder) "),Kl=a("code"),fy=i("[tgt_lang_code] X [eos]"),gy=c(),ec=a("p"),_y=i(`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),yy=c(),mn=a("div"),M(Ws.$$.fragment),by=c(),tc=a("p"),My=i("Reset the special tokens to the source lang setting. prefix=[src_lang_code] and suffix=[eos]."),Ty=c(),fn=a("div"),M(Ns.$$.fragment),vy=c(),oc=a("p"),ky=i("Reset the special tokens to the target language setting. prefix=[src_lang_code] and suffix=[eos]."),uu=c(),To=a("h2"),gn=a("a"),nc=a("span"),M(Rs.$$.fragment),wy=c(),ac=a("span"),Jy=i("MBartModel"),hu=c(),Ke=a("div"),M(Xs.$$.fragment),Fy=c(),Vs=a("p"),Uy=i(`The bare MBART Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Qi=a("a"),jy=i("PreTrainedModel"),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.)`),zy=c(),Ss=a("p"),$y=i("This model is also a PyTorch "),As=a("a"),xy=i("torch.nn.Module"),Ey=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Cy=c(),lt=a("div"),M(Ys.$$.fragment),qy=c(),vo=a("p"),Iy=i("The "),Oi=a("a"),Zy=i("MBartModel"),Gy=i(" forward method, overrides the "),sc=a("code"),Wy=i("__call__"),Ny=i(" special method."),Ry=c(),M(_n.$$.fragment),Xy=c(),M(yn.$$.fragment),mu=c(),ko=a("h2"),bn=a("a"),rc=a("span"),M(Qs.$$.fragment),Vy=c(),ic=a("span"),Sy=i("MBartForConditionalGeneration"),fu=c(),et=a("div"),M(Os.$$.fragment),Ay=c(),Ps=a("p"),Yy=i(`The MBART Model with a language modeling head. Can be used for summarization, after fine-tuning the pretrained models.
This model inherits from `),Pi=a("a"),Qy=i("PreTrainedModel"),Oy=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.)`),Py=c(),Ds=a("p"),Dy=i("This model is also a PyTorch "),Hs=a("a"),Hy=i("torch.nn.Module"),Ly=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ky=c(),Re=a("div"),M(Ls.$$.fragment),eb=c(),wo=a("p"),tb=i("The "),Di=a("a"),ob=i("MBartForConditionalGeneration"),nb=i(" forward method, overrides the "),dc=a("code"),ab=i("__call__"),sb=i(" special method."),rb=c(),M(Mn.$$.fragment),ib=c(),M(Tn.$$.fragment),db=c(),M(vn.$$.fragment),gu=c(),Jo=a("h2"),kn=a("a"),lc=a("span"),M(Ks.$$.fragment),lb=c(),cc=a("span"),cb=i("MBartForQuestionAnswering"),_u=c(),xe=a("div"),M(er.$$.fragment),pb=c(),Fo=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"),gb=i(")."),_b=c(),tr=a("p"),yb=i("This model inherits from "),Hi=a("a"),bb=i("PreTrainedModel"),Mb=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.)`),Tb=c(),or=a("p"),vb=i("This model is also a PyTorch "),nr=a("a"),kb=i("torch.nn.Module"),wb=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Jb=c(),ct=a("div"),M(ar.$$.fragment),Fb=c(),Uo=a("p"),Ub=i("The "),Li=a("a"),jb=i("MBartForQuestionAnswering"),Bb=i(" forward method, overrides the "),hc=a("code"),zb=i("__call__"),$b=i(" special method."),xb=c(),M(wn.$$.fragment),Eb=c(),M(Jn.$$.fragment),yu=c(),jo=a("h2"),Fn=a("a"),mc=a("span"),M(sr.$$.fragment),Cb=c(),fc=a("span"),qb=i("MBartForSequenceClassification"),bu=c(),Ee=a("div"),M(rr.$$.fragment),Ib=c(),gc=a("p"),Zb=i(`MBart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),Gb=c(),ir=a("p"),Wb=i("This model inherits from "),Ki=a("a"),Nb=i("PreTrainedModel"),Rb=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.)`),Xb=c(),dr=a("p"),Vb=i("This model is also a PyTorch "),lr=a("a"),Sb=i("torch.nn.Module"),Ab=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Yb=c(),Xe=a("div"),M(cr.$$.fragment),Qb=c(),Bo=a("p"),Ob=i("The "),ed=a("a"),Pb=i("MBartForSequenceClassification"),Db=i(" forward method, overrides the "),_c=a("code"),Hb=i("__call__"),Lb=i(" special method."),Kb=c(),M(Un.$$.fragment),eM=c(),M(jn.$$.fragment),tM=c(),M(Bn.$$.fragment),Mu=c(),zo=a("h2"),zn=a("a"),yc=a("span"),M(pr.$$.fragment),oM=c(),bc=a("span"),nM=i("MBartForCausalLM"),Tu=c(),$o=a("div"),M(ur.$$.fragment),aM=c(),$n=a("div"),M(hr.$$.fragment),sM=c(),M(xn.$$.fragment),vu=c(),xo=a("h2"),En=a("a"),Mc=a("span"),M(mr.$$.fragment),rM=c(),Tc=a("span"),iM=i("TFMBartModel"),ku=c(),Ce=a("div"),M(fr.$$.fragment),dM=c(),gr=a("p"),lM=i(`The bare MBART Model outputting raw hidden-states without any specific head on top.
This model inherits from `),td=a("a"),cM=i("TFPreTrainedModel"),pM=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.)`),uM=c(),_r=a("p"),hM=i("This model is also a "),yr=a("a"),mM=i("tf.keras.Model"),fM=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.`),gM=c(),M(Cn.$$.fragment),_M=c(),pt=a("div"),M(br.$$.fragment),yM=c(),Eo=a("p"),bM=i("The "),od=a("a"),MM=i("TFMBartModel"),TM=i(" forward method, overrides the "),vc=a("code"),vM=i("__call__"),kM=i(" special method."),wM=c(),M(qn.$$.fragment),JM=c(),M(In.$$.fragment),wu=c(),Co=a("h2"),Zn=a("a"),kc=a("span"),M(Mr.$$.fragment),FM=c(),wc=a("span"),UM=i("TFMBartForConditionalGeneration"),Ju=c(),qe=a("div"),M(Tr.$$.fragment),jM=c(),vr=a("p"),BM=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"),zM=i("TFPreTrainedModel"),$M=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.)`),xM=c(),kr=a("p"),EM=i("This model is also a "),wr=a("a"),CM=i("tf.keras.Model"),qM=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.`),IM=c(),M(Gn.$$.fragment),ZM=c(),Ve=a("div"),M(Jr.$$.fragment),GM=c(),qo=a("p"),WM=i("The "),ad=a("a"),NM=i("TFMBartForConditionalGeneration"),RM=i(" forward method, overrides the "),Jc=a("code"),XM=i("__call__"),VM=i(" special method."),SM=c(),M(Wn.$$.fragment),AM=c(),M(Nn.$$.fragment),YM=c(),M(Rn.$$.fragment),Fu=c(),Io=a("h2"),Xn=a("a"),Fc=a("span"),M(Fr.$$.fragment),QM=c(),Uc=a("span"),OM=i("FlaxMBartModel"),Uu=c(),O=a("div"),M(Ur.$$.fragment),PM=c(),jr=a("p"),DM=i(`The bare MBart Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),sd=a("a"),HM=i("FlaxPreTrainedModel"),LM=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.)`),KM=c(),Br=a("p"),eT=i(`This model is also a Flax Linen
`),zr=a("a"),tT=i("flax.nn.Module"),oT=i(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),nT=c(),jc=a("p"),aT=i("Finally, this model supports inherent JAX features such as:"),sT=c(),Ct=a("ul"),Bc=a("li"),$r=a("a"),rT=i("Just-In-Time (JIT) compilation"),iT=c(),zc=a("li"),xr=a("a"),dT=i("Automatic Differentiation"),lT=c(),$c=a("li"),Er=a("a"),cT=i("Vectorization"),pT=c(),xc=a("li"),Cr=a("a"),uT=i("Parallelization"),hT=c(),ut=a("div"),M(qr.$$.fragment),mT=c(),Zo=a("p"),fT=i("The "),Ec=a("code"),gT=i("FlaxMBartPreTrainedModel"),_T=i(" forward method, overrides the "),Cc=a("code"),yT=i("__call__"),bT=i(" special method."),MT=c(),M(Vn.$$.fragment),TT=c(),M(Sn.$$.fragment),vT=c(),An=a("div"),M(Ir.$$.fragment),kT=c(),M(Yn.$$.fragment),wT=c(),Qn=a("div"),M(Zr.$$.fragment),JT=c(),M(On.$$.fragment),ju=c(),Go=a("h2"),Pn=a("a"),qc=a("span"),M(Gr.$$.fragment),FT=c(),Ic=a("span"),UT=i("FlaxMBartForConditionalGeneration"),Bu=c(),P=a("div"),M(Wr.$$.fragment),jT=c(),Nr=a("p"),BT=i(`The MMBart Model with a language modeling head. Can be used for summarization.
This model inherits from `),rd=a("a"),zT=i("FlaxPreTrainedModel"),$T=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.)`),xT=c(),Rr=a("p"),ET=i(`This model is also a Flax Linen
`),Xr=a("a"),CT=i("flax.nn.Module"),qT=i(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),IT=c(),Zc=a("p"),ZT=i("Finally, this model supports inherent JAX features such as:"),GT=c(),qt=a("ul"),Gc=a("li"),Vr=a("a"),WT=i("Just-In-Time (JIT) compilation"),NT=c(),Wc=a("li"),Sr=a("a"),RT=i("Automatic Differentiation"),XT=c(),Nc=a("li"),Ar=a("a"),VT=i("Vectorization"),ST=c(),Rc=a("li"),Yr=a("a"),AT=i("Parallelization"),YT=c(),Se=a("div"),M(Qr.$$.fragment),QT=c(),Wo=a("p"),OT=i("The "),Xc=a("code"),PT=i("FlaxMBartPreTrainedModel"),DT=i(" forward method, overrides the "),Vc=a("code"),HT=i("__call__"),LT=i(" special method."),KT=c(),M(Dn.$$.fragment),ev=c(),M(Hn.$$.fragment),tv=c(),M(Ln.$$.fragment),ov=c(),Kn=a("div"),M(Or.$$.fragment),nv=c(),M(ea.$$.fragment),av=c(),ta=a("div"),M(Pr.$$.fragment),sv=c(),M(oa.$$.fragment),zu=c(),No=a("h2"),na=a("a"),Sc=a("span"),M(Dr.$$.fragment),rv=c(),Ac=a("span"),iv=i("FlaxMBartForSequenceClassification"),$u=c(),X=a("div"),M(Hr.$$.fragment),dv=c(),Yc=a("p"),lv=i(`MBart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),cv=c(),Lr=a("p"),pv=i("This model inherits from "),id=a("a"),uv=i("FlaxPreTrainedModel"),hv=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.)`),mv=c(),Kr=a("p"),fv=i(`This model is also a Flax Linen
`),ei=a("a"),gv=i("flax.nn.Module"),_v=i(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),yv=c(),Qc=a("p"),bv=i("Finally, this model supports inherent JAX features such as:"),Mv=c(),It=a("ul"),Oc=a("li"),ti=a("a"),Tv=i("Just-In-Time (JIT) compilation"),vv=c(),Pc=a("li"),oi=a("a"),kv=i("Automatic Differentiation"),wv=c(),Dc=a("li"),ni=a("a"),Jv=i("Vectorization"),Fv=c(),Hc=a("li"),ai=a("a"),Uv=i("Parallelization"),jv=c(),ht=a("div"),M(si.$$.fragment),Bv=c(),Ro=a("p"),zv=i("The "),Lc=a("code"),$v=i("FlaxMBartPreTrainedModel"),xv=i(" forward method, overrides the "),Kc=a("code"),Ev=i("__call__"),Cv=i(" special method."),qv=c(),M(aa.$$.fragment),Iv=c(),M(sa.$$.fragment),Zv=c(),ra=a("div"),M(ri.$$.fragment),Gv=c(),M(ia.$$.fragment),Wv=c(),da=a("div"),M(ii.$$.fragment),Nv=c(),M(la.$$.fragment),xu=c(),Xo=a("h2"),ca=a("a"),ep=a("span"),M(di.$$.fragment),Rv=c(),tp=a("span"),Xv=i("FlaxMBartForQuestionAnswering"),Eu=c(),V=a("div"),M(li.$$.fragment),Vv=c(),Vo=a("p"),Sv=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"),Av=i("span start logits"),Yv=i(" and "),np=a("code"),Qv=i("span end logits"),Ov=i(")."),Pv=c(),ci=a("p"),Dv=i("This model inherits from "),dd=a("a"),Hv=i("FlaxPreTrainedModel"),Lv=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.)`),Kv=c(),pi=a("p"),ek=i(`This model is also a Flax Linen
`),ui=a("a"),tk=i("flax.nn.Module"),ok=i(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),nk=c(),ap=a("p"),ak=i("Finally, this model supports inherent JAX features such as:"),sk=c(),Zt=a("ul"),sp=a("li"),hi=a("a"),rk=i("Just-In-Time (JIT) compilation"),ik=c(),rp=a("li"),mi=a("a"),dk=i("Automatic Differentiation"),lk=c(),ip=a("li"),fi=a("a"),ck=i("Vectorization"),pk=c(),dp=a("li"),gi=a("a"),uk=i("Parallelization"),hk=c(),mt=a("div"),M(_i.$$.fragment),mk=c(),So=a("p"),fk=i("The "),lp=a("code"),gk=i("FlaxMBartPreTrainedModel"),_k=i(" forward method, overrides the "),cp=a("code"),yk=i("__call__"),bk=i(" special method."),Mk=c(),M(pa.$$.fragment),Tk=c(),M(ua.$$.fragment),vk=c(),ha=a("div"),M(yi.$$.fragment),kk=c(),M(ma.$$.fragment),wk=c(),fa=a("div"),M(bi.$$.fragment),Jk=c(),M(ga.$$.fragment),this.h()},l(o){const g=N1('[data-svelte="svelte-1phssyn"]',document.head);l=s(g,"META",{name:!0,content:!0}),g.forEach(t),b=p(o),f=s(o,"H1",{class:!0});var Mi=r(f);h=s(Mi,"A",{id:!0,class:!0,href:!0});var pp=r(h);y=s(pp,"SPAN",{});var up=r(y);T(n.$$.fragment,up),up.forEach(t),pp.forEach(t),u=p(Mi),B=s(Mi,"SPAN",{});var hp=r(B);bt=d(hp,"MBart and MBart-50"),hp.forEach(t),Mi.forEach(t),ot=p(o),Y=s(o,"DIV",{class:!0});var Ti=r(Y);Ie=s(Ti,"A",{href:!0});var mp=r(Ie);he=s(mp,"IMG",{alt:!0,src:!0}),mp.forEach(t),Mt=p(Ti),ee=s(Ti,"A",{href:!0});var fp=r(ee);Ze=s(fp,"IMG",{alt:!0,src:!0}),fp.forEach(t),Ti.forEach(t),me=p(o),re=s(o,"P",{});var _a=r(re);Ye=s(_a,"STRONG",{});var gp=r(Ye);ve=d(gp,"DISCLAIMER:"),gp.forEach(t),Tt=d(_a," If you see something strange, file a "),ke=s(_a,"A",{href:!0,rel:!0});var _p=r(ke);we=d(_p,"Github Issue"),_p.forEach(t),vt=d(_a,` and assign
@patrickvonplaten`),_a.forEach(t),nt=p(o),Q=s(o,"H2",{class:!0});var vi=r(Q);fe=s(vi,"A",{id:!0,class:!0,href:!0});var yp=r(fe);Qe=s(yp,"SPAN",{});var bp=r(Qe);T(ie.$$.fragment,bp),bp.forEach(t),yp.forEach(t),Z=p(vi),G=s(vi,"SPAN",{});var Mp=r(G);kt=d(Mp,"Overview of MBart"),Mp.forEach(t),vi.forEach(t),ge=p(o),_e=s(o,"P",{});var ki=r(_e);wt=d(ki,"The MBart model was presented in "),H=s(ki,"A",{href:!0,rel:!0});var Tp=r(H);Jt=d(Tp,"Multilingual Denoising Pre-training for Neural Machine Translation"),Tp.forEach(t),Ft=d(ki,` by Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov Marjan
Ghazvininejad, Mike Lewis, Luke Zettlemoyer.`),ki.forEach(t),S=p(o),Ge=s(o,"P",{});var vp=r(Ge);Je=d(vp,`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.`),vp.forEach(t),at=p(o),de=s(o,"P",{});var ya=r(de);Fe=d(ya,"This model was contributed by "),Ue=s(ya,"A",{href:!0,rel:!0});var kp=r(Ue);Ut=d(kp,"valhalla"),kp.forEach(t),le=d(ya,". The Authors\u2019 code can be found "),je=s(ya,"A",{href:!0,rel:!0});var wp=r(je);Be=d(wp,"here"),wp.forEach(t),ya.forEach(t),st=p(o),L=s(o,"H3",{class:!0});var wi=r(L);I=s(wi,"A",{id:!0,class:!0,href:!0});var Jp=r(I);Oe=s(Jp,"SPAN",{});var Fp=r(Oe);T(W.$$.fragment,Fp),Fp.forEach(t),Jp.forEach(t),jt=p(wi),Pe=s(wi,"SPAN",{});var Up=r(Pe);U=d(Up,"Training of MBart"),Up.forEach(t),wi.forEach(t),$=p(o),D=s(o,"P",{});var tt=r(D);De=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 `),Bt=s(tt,"CODE",{});var jp=r(Bt);Ht=d(jp,"X [eos, src_lang_code]"),jp.forEach(t),E=d(tt," where "),zt=s(tt,"CODE",{});var Bp=r(zt);Lt=d(Bp,"X"),Bp.forEach(t),Kt=d(tt,` is the source text. The
target text format is `),$t=s(tt,"CODE",{});var zp=r($t);eo=d(zp,"[tgt_lang_code] X [eos]"),zp.forEach(t),ce=d(tt,". "),pe=s(tt,"CODE",{});var $p=r(pe);to=d($p,"bos"),$p.forEach(t),oo=d(tt," is never used."),tt.forEach(t),ye=p(o),te=s(o,"P",{});var Gt=r(te);no=d(Gt,"The regular "),ze=s(Gt,"A",{href:!0});var ld=r(ze);xt=s(ld,"STRONG",{});var xp=r(xt);He=d(xp,"call"),xp.forEach(t),ao=d(ld,"()"),ld.forEach(t),dm=d(Gt," will encode source text format passed as first argument or with the "),Bd=s(Gt,"CODE",{});var Ep=r(Bd);lm=d(Ep,"text"),Ep.forEach(t),cm=d(Gt,`
keyword, and target text format passed with the `),zd=s(Gt,"CODE",{});var Cp=r(zd);pm=d(Cp,"text_label"),Cp.forEach(t),um=d(Gt," keyword argument."),Gt.forEach(t),Wp=p(o),Fi=s(o,"UL",{});var qp=r(Fi);$d=s(qp,"LI",{});var Ip=r($d);hm=d(Ip,"Supervised training"),Ip.forEach(t),qp.forEach(t),Np=p(o),T(Ia.$$.fragment,o),Rp=p(o),Ui=s(o,"UL",{});var Zp=r(Ui);Za=s(Zp,"LI",{});var Ji=r(Za);xd=s(Ji,"P",{});var Gp=r(xd);mm=d(Gp,"Generation"),Gp.forEach(t),fm=p(Ji),so=s(Ji,"P",{});var Ao=r(so);gm=d(Ao,"While generating the target text set the "),Ed=s(Ao,"CODE",{});var Fk=r(Ed);_m=d(Fk,"decoder_start_token_id"),Fk.forEach(t),ym=d(Ao,` to the target language id. The following
example shows how to translate English to Romanian using the `),Cd=s(Ao,"EM",{});var Uk=r(Cd);bm=d(Uk,"facebook/mbart-large-en-ro"),Uk.forEach(t),Mm=d(Ao," model."),Ao.forEach(t),Ji.forEach(t),Zp.forEach(t),Xp=p(o),T(Ga.$$.fragment,o),Vp=p(o),ro=s(o,"H2",{class:!0});var qu=r(ro);Yo=s(qu,"A",{id:!0,class:!0,href:!0});var jk=r(Yo);qd=s(jk,"SPAN",{});var Bk=r(qd);T(Wa.$$.fragment,Bk),Bk.forEach(t),jk.forEach(t),Tm=p(qu),Id=s(qu,"SPAN",{});var zk=r(Id);vm=d(zk,"Overview of MBart-50"),zk.forEach(t),qu.forEach(t),Sp=p(o),Nt=s(o,"P",{});var cd=r(Nt);km=d(cd,"MBart-50 was introduced in the "),Na=s(cd,"A",{href:!0,rel:!0});var $k=r(Na);wm=d($k,"Multilingual Translation with Extensible Multilingual Pretraining and Finetuning"),$k.forEach(t),Jm=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 `),Zd=s(cd,"EM",{});var xk=r(Zd);Fm=d(xk,"mbart-large-cc25"),xk.forEach(t),Um=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),Ap=p(o),ji=s(o,"P",{});var Ek=r(ji);jm=d(Ek,"According to the abstract"),Ek.forEach(t),Yp=p(o),Bi=s(o,"P",{});var Ck=r(Bi);Gd=s(Ck,"EM",{});var qk=r(Gd);Bm=d(qk,`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.`),qk.forEach(t),Ck.forEach(t),Qp=p(o),io=s(o,"H3",{class:!0});var Iu=r(io);Qo=s(Iu,"A",{id:!0,class:!0,href:!0});var Ik=r(Qo);Wd=s(Ik,"SPAN",{});var Zk=r(Wd);T(Ra.$$.fragment,Zk),Zk.forEach(t),Ik.forEach(t),zm=p(Iu),Nd=s(Iu,"SPAN",{});var Gk=r(Nd);$m=d(Gk,"Training of MBart-50"),Gk.forEach(t),Iu.forEach(t),Op=p(o),rt=s(o,"P",{});var ba=r(rt);xm=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 `),Rd=s(ba,"CODE",{});var Wk=r(Rd);Em=d(Wk,"[lang_code] X [eos]"),Wk.forEach(t),Cm=d(ba,", where "),Xd=s(ba,"CODE",{});var Nk=r(Xd);qm=d(Nk,"lang_code"),Nk.forEach(t),Im=d(ba,` is source
language id for source text and target language id for target text, with `),Vd=s(ba,"CODE",{});var Rk=r(Vd);Zm=d(Rk,"X"),Rk.forEach(t),Gm=d(ba,` being the source or target text
respectively.`),ba.forEach(t),Pp=p(o),Oo=s(o,"P",{});var Zu=r(Oo);Wm=d(Zu,"MBart-50 has its own tokenizer "),zi=s(Zu,"A",{href:!0});var Xk=r(zi);Nm=d(Xk,"MBart50Tokenizer"),Xk.forEach(t),Rm=d(Zu,"."),Zu.forEach(t),Dp=p(o),$i=s(o,"UL",{});var Vk=r($i);Sd=s(Vk,"LI",{});var Sk=r(Sd);Xm=d(Sk,"Supervised training"),Sk.forEach(t),Vk.forEach(t),Hp=p(o),T(Xa.$$.fragment,o),Lp=p(o),xi=s(o,"UL",{});var Ak=r(xi);Va=s(Ak,"LI",{});var Gu=r(Va);Ad=s(Gu,"P",{});var Yk=r(Ad);Vm=d(Yk,"Generation"),Yk.forEach(t),Sm=p(Gu),$e=s(Gu,"P",{});var ft=r($e);Am=d(ft,"To generate using the mBART-50 multilingual translation models, "),Yd=s(ft,"CODE",{});var Qk=r(Yd);Ym=d(Qk,"eos_token_id"),Qk.forEach(t),Qm=d(ft,` is used as the
`),Qd=s(ft,"CODE",{});var Ok=r(Qd);Om=d(Ok,"decoder_start_token_id"),Ok.forEach(t),Pm=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 `),Od=s(ft,"EM",{});var Pk=r(Od);Dm=d(Pk,"forced_bos_token_id"),Pk.forEach(t),Hm=d(ft," parameter to the "),Pd=s(ft,"EM",{});var Dk=r(Pd);Lm=d(Dk,"generate"),Dk.forEach(t),Km=d(ft,` method.
The following example shows how to translate between Hindi to French and Arabic to English using the
`),Dd=s(ft,"EM",{});var Hk=r(Dd);ef=d(Hk,"facebook/mbart-50-large-many-to-many"),Hk.forEach(t),tf=d(ft," checkpoint."),ft.forEach(t),Gu.forEach(t),Ak.forEach(t),Kp=p(o),T(Sa.$$.fragment,o),eu=p(o),lo=s(o,"H2",{class:!0});var Wu=r(lo);Po=s(Wu,"A",{id:!0,class:!0,href:!0});var Lk=r(Po);Hd=s(Lk,"SPAN",{});var Kk=r(Hd);T(Aa.$$.fragment,Kk),Kk.forEach(t),Lk.forEach(t),of=p(Wu),Ld=s(Wu,"SPAN",{});var e0=r(Ld);nf=d(e0,"Documentation resources"),e0.forEach(t),Wu.forEach(t),tu=p(o),be=s(o,"UL",{});var gt=r(be);Kd=s(gt,"LI",{});var t0=r(Kd);Ei=s(t0,"A",{href:!0});var o0=r(Ei);af=d(o0,"Text classification task guide"),o0.forEach(t),t0.forEach(t),sf=p(gt),el=s(gt,"LI",{});var n0=r(el);Ci=s(n0,"A",{href:!0});var a0=r(Ci);rf=d(a0,"Question answering task guide"),a0.forEach(t),n0.forEach(t),df=p(gt),tl=s(gt,"LI",{});var s0=r(tl);qi=s(s0,"A",{href:!0});var r0=r(qi);lf=d(r0,"Causal language modeling task guide"),r0.forEach(t),s0.forEach(t),cf=p(gt),ol=s(gt,"LI",{});var i0=r(ol);Ii=s(i0,"A",{href:!0});var d0=r(Ii);pf=d(d0,"Masked language modeling task guide"),d0.forEach(t),i0.forEach(t),uf=p(gt),nl=s(gt,"LI",{});var l0=r(nl);Zi=s(l0,"A",{href:!0});var c0=r(Zi);hf=d(c0,"Translation task guide"),c0.forEach(t),l0.forEach(t),mf=p(gt),al=s(gt,"LI",{});var p0=r(al);Gi=s(p0,"A",{href:!0});var u0=r(Gi);ff=d(u0,"Summarization task guide"),u0.forEach(t),p0.forEach(t),gt.forEach(t),ou=p(o),co=s(o,"H2",{class:!0});var Nu=r(co);Do=s(Nu,"A",{id:!0,class:!0,href:!0});var h0=r(Do);sl=s(h0,"SPAN",{});var m0=r(sl);T(Ya.$$.fragment,m0),m0.forEach(t),h0.forEach(t),gf=p(Nu),rl=s(Nu,"SPAN",{});var f0=r(rl);_f=d(f0,"MBartConfig"),f0.forEach(t),Nu.forEach(t),nu=p(o),Le=s(o,"DIV",{class:!0});var Ma=r(Le);T(Qa.$$.fragment,Ma),yf=p(Ma),po=s(Ma,"P",{});var pd=r(po);bf=d(pd,"This is the configuration class to store the configuration of a "),Wi=s(pd,"A",{href:!0});var g0=r(Wi);Mf=d(g0,"MBartModel"),g0.forEach(t),Tf=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
`),Oa=s(pd,"A",{href:!0,rel:!0});var _0=r(Oa);vf=d(_0,"facebook/mbart-large-cc25"),_0.forEach(t),kf=d(pd," architecture."),pd.forEach(t),wf=p(Ma),uo=s(Ma,"P",{});var ud=r(uo);Jf=d(ud,"Configuration objects inherit from "),Ni=s(ud,"A",{href:!0});var y0=r(Ni);Ff=d(y0,"PretrainedConfig"),y0.forEach(t),Uf=d(ud,` and can be used to control the model outputs. Read the
documentation from `),Ri=s(ud,"A",{href:!0});var b0=r(Ri);jf=d(b0,"PretrainedConfig"),b0.forEach(t),Bf=d(ud," for more information."),ud.forEach(t),zf=p(Ma),T(Ho.$$.fragment,Ma),Ma.forEach(t),au=p(o),ho=s(o,"H2",{class:!0});var Ru=r(ho);Lo=s(Ru,"A",{id:!0,class:!0,href:!0});var M0=r(Lo);il=s(M0,"SPAN",{});var T0=r(il);T(Pa.$$.fragment,T0),T0.forEach(t),M0.forEach(t),$f=p(Ru),dl=s(Ru,"SPAN",{});var v0=r(dl);xf=d(v0,"MBartTokenizer"),v0.forEach(t),Ru.forEach(t),su=p(o),ue=s(o,"DIV",{class:!0});var _t=r(ue);T(Da.$$.fragment,_t),Ef=p(_t),ll=s(_t,"P",{});var k0=r(ll);Cf=d(k0,"Construct an MBART tokenizer."),k0.forEach(t),qf=p(_t),Et=s(_t,"P",{});var Ta=r(Et);If=d(Ta,"Adapted from "),Xi=s(Ta,"A",{href:!0});var w0=r(Xi);Zf=d(w0,"RobertaTokenizer"),w0.forEach(t),Gf=d(Ta," and "),Vi=s(Ta,"A",{href:!0});var J0=r(Vi);Wf=d(J0,"XLNetTokenizer"),J0.forEach(t),Nf=d(Ta,`. Based on
`),Ha=s(Ta,"A",{href:!0,rel:!0});var F0=r(Ha);Rf=d(F0,"SentencePiece"),F0.forEach(t),Xf=d(Ta,"."),Ta.forEach(t),Vf=p(_t),mo=s(_t,"P",{});var hd=r(mo);Sf=d(hd,"The tokenization method is "),cl=s(hd,"CODE",{});var U0=r(cl);Af=d(U0,"<tokens> <eos> <language code>"),U0.forEach(t),Yf=d(hd," for source language documents, and "),pl=s(hd,"CODE",{});var j0=r(pl);Qf=d(j0,"<language code> <tokens> <eos>"),j0.forEach(t),Of=d(hd," for target language documents."),hd.forEach(t),Pf=p(_t),T(Ko.$$.fragment,_t),Df=p(_t),it=s(_t,"DIV",{class:!0});var va=r(it);T(La.$$.fragment,va),Hf=p(va),Ka=s(va,"P",{});var Xu=r(Ka);Lf=d(Xu,`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(Xu,"CODE",{});var B0=r(ul);Kf=d(B0,"X"),B0.forEach(t),eg=d(Xu," represents the sequence:"),Xu.forEach(t),tg=p(va),es=s(va,"UL",{});var Vu=r(es);ts=s(Vu,"LI",{});var Su=r(ts);hl=s(Su,"CODE",{});var z0=r(hl);og=d(z0,"input_ids"),z0.forEach(t),ng=d(Su," (for encoder) "),ml=s(Su,"CODE",{});var $0=r(ml);ag=d($0,"X [eos, src_lang_code]"),$0.forEach(t),Su.forEach(t),sg=p(Vu),os=s(Vu,"LI",{});var Au=r(os);fl=s(Au,"CODE",{});var x0=r(fl);rg=d(x0,"decoder_input_ids"),x0.forEach(t),ig=d(Au,": (for decoder) "),gl=s(Au,"CODE",{});var E0=r(gl);dg=d(E0,"X [eos, tgt_lang_code]"),E0.forEach(t),Au.forEach(t),Vu.forEach(t),lg=p(va),_l=s(va,"P",{});var C0=r(_l);cg=d(C0,`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),C0.forEach(t),va.forEach(t),_t.forEach(t),ru=p(o),fo=s(o,"H2",{class:!0});var Yu=r(fo);en=s(Yu,"A",{id:!0,class:!0,href:!0});var q0=r(en);yl=s(q0,"SPAN",{});var I0=r(yl);T(ns.$$.fragment,I0),I0.forEach(t),q0.forEach(t),pg=p(Yu),bl=s(Yu,"SPAN",{});var Z0=r(bl);ug=d(Z0,"MBartTokenizerFast"),Z0.forEach(t),Yu.forEach(t),iu=p(o),N=s(o,"DIV",{class:!0});var oe=r(N);T(as.$$.fragment,oe),hg=p(oe),go=s(oe,"P",{});var md=r(go);mg=d(md,"Construct a \u201Cfast\u201D MBART tokenizer (backed by HuggingFace\u2019s "),Ml=s(md,"EM",{});var G0=r(Ml);fg=d(G0,"tokenizers"),G0.forEach(t),gg=d(md,` library). Based on
`),ss=s(md,"A",{href:!0,rel:!0});var W0=r(ss);_g=d(W0,"BPE"),W0.forEach(t),yg=d(md,"."),md.forEach(t),bg=p(oe),rs=s(oe,"P",{});var Qu=r(rs);Mg=d(Qu,"This tokenizer inherits from "),Si=s(Qu,"A",{href:!0});var N0=r(Si);Tg=d(N0,"PreTrainedTokenizerFast"),N0.forEach(t),vg=d(Qu,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Qu.forEach(t),kg=p(oe),_o=s(oe,"P",{});var fd=r(_o);wg=d(fd,"The tokenization method is "),Tl=s(fd,"CODE",{});var R0=r(Tl);Jg=d(R0,"<tokens> <eos> <language code>"),R0.forEach(t),Fg=d(fd," for source language documents, and "),vl=s(fd,"CODE",{});var X0=r(vl);Ug=d(X0,"<language code> <tokens> <eos>"),X0.forEach(t),jg=d(fd," for target language documents."),fd.forEach(t),Bg=p(oe),T(tn.$$.fragment,oe),zg=p(oe),We=s(oe,"DIV",{class:!0});var Rt=r(We);T(is.$$.fragment,Rt),$g=p(Rt),kl=s(Rt,"P",{});var V0=r(kl);xg=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),Eg=p(Rt),ds=s(Rt,"P",{});var Ou=r(ds);Cg=d(Ou,"An MBART sequence has the following format, where "),wl=s(Ou,"CODE",{});var S0=r(wl);qg=d(S0,"X"),S0.forEach(t),Ig=d(Ou," represents the sequence:"),Ou.forEach(t),Zg=p(Rt),ls=s(Rt,"UL",{});var Pu=r(ls);cs=s(Pu,"LI",{});var Du=r(cs);Jl=s(Du,"CODE",{});var A0=r(Jl);Gg=d(A0,"input_ids"),A0.forEach(t),Wg=d(Du," (for encoder) "),Fl=s(Du,"CODE",{});var Y0=r(Fl);Ng=d(Y0,"X [eos, src_lang_code]"),Y0.forEach(t),Du.forEach(t),Rg=p(Pu),ps=s(Pu,"LI",{});var Hu=r(ps);Ul=s(Hu,"CODE",{});var Q0=r(Ul);Xg=d(Q0,"decoder_input_ids"),Q0.forEach(t),Vg=d(Hu,": (for decoder) "),jl=s(Hu,"CODE",{});var O0=r(jl);Sg=d(O0,"X [eos, tgt_lang_code]"),O0.forEach(t),Hu.forEach(t),Pu.forEach(t),Ag=p(Rt),Bl=s(Rt,"P",{});var P0=r(Bl);Yg=d(P0,`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),P0.forEach(t),Rt.forEach(t),Qg=p(oe),on=s(oe,"DIV",{class:!0});var Lu=r(on);T(us.$$.fragment,Lu),Og=p(Lu),zl=s(Lu,"P",{});var D0=r(zl);Pg=d(D0,`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.`),D0.forEach(t),Lu.forEach(t),Dg=p(oe),nn=s(oe,"DIV",{class:!0});var Ku=r(nn);T(hs.$$.fragment,Ku),Hg=p(Ku),$l=s(Ku,"P",{});var H0=r($l);Lg=d(H0,"Reset the special tokens to the source lang setting. No prefix and suffix=[eos, src_lang_code]."),H0.forEach(t),Ku.forEach(t),Kg=p(oe),an=s(oe,"DIV",{class:!0});var eh=r(an);T(ms.$$.fragment,eh),e_=p(eh),xl=s(eh,"P",{});var L0=r(xl);t_=d(L0,"Reset the special tokens to the target language setting. No prefix and suffix=[eos, tgt_lang_code]."),L0.forEach(t),eh.forEach(t),oe.forEach(t),du=p(o),yo=s(o,"H2",{class:!0});var th=r(yo);sn=s(th,"A",{id:!0,class:!0,href:!0});var K0=r(sn);El=s(K0,"SPAN",{});var ew=r(El);T(fs.$$.fragment,ew),ew.forEach(t),K0.forEach(t),o_=p(th),Cl=s(th,"SPAN",{});var tw=r(Cl);n_=d(tw,"MBart50Tokenizer"),tw.forEach(t),th.forEach(t),lu=p(o),R=s(o,"DIV",{class:!0});var ne=r(R);T(gs.$$.fragment,ne),a_=p(ne),_s=s(ne,"P",{});var oh=r(_s);s_=d(oh,"Construct a MBart50 tokenizer. Based on "),ys=s(oh,"A",{href:!0,rel:!0});var ow=r(ys);r_=d(ow,"SentencePiece"),ow.forEach(t),i_=d(oh,"."),oh.forEach(t),d_=p(ne),bs=s(ne,"P",{});var nh=r(bs);l_=d(nh,"This tokenizer inherits from "),Ai=s(nh,"A",{href:!0});var nw=r(Ai);c_=d(nw,"PreTrainedTokenizer"),nw.forEach(t),p_=d(nh,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),nh.forEach(t),u_=p(ne),T(rn.$$.fragment,ne),h_=p(ne),dt=s(ne,"DIV",{class:!0});var ka=r(dt);T(Ms.$$.fragment,ka),m_=p(ka),Ts=s(ka,"P",{});var ah=r(Ts);f_=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 `),ql=s(ah,"CODE",{});var aw=r(ql);g_=d(aw,"X"),aw.forEach(t),__=d(ah," represents the sequence:"),ah.forEach(t),y_=p(ka),vs=s(ka,"UL",{});var sh=r(vs);ks=s(sh,"LI",{});var rh=r(ks);Il=s(rh,"CODE",{});var sw=r(Il);b_=d(sw,"input_ids"),sw.forEach(t),M_=d(rh," (for encoder) "),Zl=s(rh,"CODE",{});var rw=r(Zl);T_=d(rw,"[src_lang_code] X [eos]"),rw.forEach(t),rh.forEach(t),v_=p(sh),ws=s(sh,"LI",{});var ih=r(ws);Gl=s(ih,"CODE",{});var iw=r(Gl);k_=d(iw,"labels"),iw.forEach(t),w_=d(ih,": (for decoder) "),Wl=s(ih,"CODE",{});var dw=r(Wl);J_=d(dw,"[tgt_lang_code] X [eos]"),dw.forEach(t),ih.forEach(t),sh.forEach(t),F_=p(ka),Nl=s(ka,"P",{});var lw=r(Nl);U_=d(lw,`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),lw.forEach(t),ka.forEach(t),j_=p(ne),dn=s(ne,"DIV",{class:!0});var dh=r(dn);T(Js.$$.fragment,dh),B_=p(dh),Rl=s(dh,"P",{});var cw=r(Rl);z_=d(cw,"Converts a sequence of tokens (string) in a single string."),cw.forEach(t),dh.forEach(t),$_=p(ne),ln=s(ne,"DIV",{class:!0});var lh=r(ln);T(Fs.$$.fragment,lh),x_=p(lh),Us=s(lh,"P",{});var ch=r(Us);E_=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 `),Xl=s(ch,"CODE",{});var pw=r(Xl);C_=d(pw,"prepare_for_model"),pw.forEach(t),q_=d(ch," method."),ch.forEach(t),lh.forEach(t),I_=p(ne),cn=s(ne,"DIV",{class:!0});var ph=r(cn);T(js.$$.fragment,ph),Z_=p(ph),Vl=s(ph,"P",{});var uw=r(Vl);G_=d(uw,"Reset the special tokens to the source lang setting. prefix=[src_lang_code] and suffix=[eos]."),uw.forEach(t),ph.forEach(t),W_=p(ne),pn=s(ne,"DIV",{class:!0});var uh=r(pn);T(Bs.$$.fragment,uh),N_=p(uh),Sl=s(uh,"P",{});var hw=r(Sl);R_=d(hw,"Reset the special tokens to the target language setting. prefix=[tgt_lang_code] and suffix=[eos]."),hw.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 mw=r(un);Al=s(mw,"SPAN",{});var fw=r(Al);T(zs.$$.fragment,fw),fw.forEach(t),mw.forEach(t),X_=p(hh),Yl=s(hh,"SPAN",{});var gw=r(Yl);V_=d(gw,"MBart50TokenizerFast"),gw.forEach(t),hh.forEach(t),pu=p(o),K=s(o,"DIV",{class:!0});var Ae=r(K);T($s.$$.fragment,Ae),S_=p(Ae),Mo=s(Ae,"P",{});var gd=r(Mo);A_=d(gd,"Construct a \u201Cfast\u201D MBART tokenizer for mBART-50 (backed by HuggingFace\u2019s "),Ql=s(gd,"EM",{});var _w=r(Ql);Y_=d(_w,"tokenizers"),_w.forEach(t),Q_=d(gd,` library). Based on
`),xs=s(gd,"A",{href:!0,rel:!0});var yw=r(xs);O_=d(yw,"BPE"),yw.forEach(t),P_=d(gd,"."),gd.forEach(t),D_=p(Ae),Es=s(Ae,"P",{});var mh=r(Es);H_=d(mh,"This tokenizer inherits from "),Yi=s(mh,"A",{href:!0});var bw=r(Yi);L_=d(bw,"PreTrainedTokenizerFast"),bw.forEach(t),K_=d(mh,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),mh.forEach(t),ey=p(Ae),T(hn.$$.fragment,Ae),ty=p(Ae),Ne=s(Ae,"DIV",{class:!0});var Xt=r(Ne);T(Cs.$$.fragment,Xt),oy=p(Xt),Ol=s(Xt,"P",{});var Mw=r(Ol);ny=d(Mw,`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.`),Mw.forEach(t),ay=p(Xt),qs=s(Xt,"P",{});var fh=r(qs);sy=d(fh,"An MBART-50 sequence has the following format, where "),Pl=s(fh,"CODE",{});var Tw=r(Pl);ry=d(Tw,"X"),Tw.forEach(t),iy=d(fh," represents the sequence:"),fh.forEach(t),dy=p(Xt),Is=s(Xt,"UL",{});var gh=r(Is);Zs=s(gh,"LI",{});var _h=r(Zs);Dl=s(_h,"CODE",{});var vw=r(Dl);ly=d(vw,"input_ids"),vw.forEach(t),cy=d(_h," (for encoder) "),Hl=s(_h,"CODE",{});var kw=r(Hl);py=d(kw,"[src_lang_code] X [eos]"),kw.forEach(t),_h.forEach(t),uy=p(gh),Gs=s(gh,"LI",{});var yh=r(Gs);Ll=s(yh,"CODE",{});var ww=r(Ll);hy=d(ww,"labels"),ww.forEach(t),my=d(yh,": (for decoder) "),Kl=s(yh,"CODE",{});var Jw=r(Kl);fy=d(Jw,"[tgt_lang_code] X [eos]"),Jw.forEach(t),yh.forEach(t),gh.forEach(t),gy=p(Xt),ec=s(Xt,"P",{});var Fw=r(ec);_y=d(Fw,`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),Fw.forEach(t),Xt.forEach(t),yy=p(Ae),mn=s(Ae,"DIV",{class:!0});var bh=r(mn);T(Ws.$$.fragment,bh),by=p(bh),tc=s(bh,"P",{});var Uw=r(tc);My=d(Uw,"Reset the special tokens to the source lang setting. prefix=[src_lang_code] and suffix=[eos]."),Uw.forEach(t),bh.forEach(t),Ty=p(Ae),fn=s(Ae,"DIV",{class:!0});var Mh=r(fn);T(Ns.$$.fragment,Mh),vy=p(Mh),oc=s(Mh,"P",{});var jw=r(oc);ky=d(jw,"Reset the special tokens to the target language setting. prefix=[src_lang_code] and suffix=[eos]."),jw.forEach(t),Mh.forEach(t),Ae.forEach(t),uu=p(o),To=s(o,"H2",{class:!0});var Th=r(To);gn=s(Th,"A",{id:!0,class:!0,href:!0});var Bw=r(gn);nc=s(Bw,"SPAN",{});var zw=r(nc);T(Rs.$$.fragment,zw),zw.forEach(t),Bw.forEach(t),wy=p(Th),ac=s(Th,"SPAN",{});var $w=r(ac);Jy=d($w,"MBartModel"),$w.forEach(t),Th.forEach(t),hu=p(o),Ke=s(o,"DIV",{class:!0});var wa=r(Ke);T(Xs.$$.fragment,wa),Fy=p(wa),Vs=s(wa,"P",{});var vh=r(Vs);Uy=d(vh,`The bare MBART Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Qi=s(vh,"A",{href:!0});var xw=r(Qi);jy=d(xw,"PreTrainedModel"),xw.forEach(t),By=d(vh,`. 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.)`),vh.forEach(t),zy=p(wa),Ss=s(wa,"P",{});var kh=r(Ss);$y=d(kh,"This model is also a PyTorch "),As=s(kh,"A",{href:!0,rel:!0});var Ew=r(As);xy=d(Ew,"torch.nn.Module"),Ew.forEach(t),Ey=d(kh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),kh.forEach(t),Cy=p(wa),lt=s(wa,"DIV",{class:!0});var Ja=r(lt);T(Ys.$$.fragment,Ja),qy=p(Ja),vo=s(Ja,"P",{});var _d=r(vo);Iy=d(_d,"The "),Oi=s(_d,"A",{href:!0});var Cw=r(Oi);Zy=d(Cw,"MBartModel"),Cw.forEach(t),Gy=d(_d," forward method, overrides the "),sc=s(_d,"CODE",{});var qw=r(sc);Wy=d(qw,"__call__"),qw.forEach(t),Ny=d(_d," special method."),_d.forEach(t),Ry=p(Ja),T(_n.$$.fragment,Ja),Xy=p(Ja),T(yn.$$.fragment,Ja),Ja.forEach(t),wa.forEach(t),mu=p(o),ko=s(o,"H2",{class:!0});var wh=r(ko);bn=s(wh,"A",{id:!0,class:!0,href:!0});var Iw=r(bn);rc=s(Iw,"SPAN",{});var Zw=r(rc);T(Qs.$$.fragment,Zw),Zw.forEach(t),Iw.forEach(t),Vy=p(wh),ic=s(wh,"SPAN",{});var Gw=r(ic);Sy=d(Gw,"MBartForConditionalGeneration"),Gw.forEach(t),wh.forEach(t),fu=p(o),et=s(o,"DIV",{class:!0});var Fa=r(et);T(Os.$$.fragment,Fa),Ay=p(Fa),Ps=s(Fa,"P",{});var Jh=r(Ps);Yy=d(Jh,`The MBART Model with a language modeling head. Can be used for summarization, after fine-tuning the pretrained models.
This model inherits from `),Pi=s(Jh,"A",{href:!0});var Ww=r(Pi);Qy=d(Ww,"PreTrainedModel"),Ww.forEach(t),Oy=d(Jh,`. 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.)`),Jh.forEach(t),Py=p(Fa),Ds=s(Fa,"P",{});var Fh=r(Ds);Dy=d(Fh,"This model is also a PyTorch "),Hs=s(Fh,"A",{href:!0,rel:!0});var Nw=r(Hs);Hy=d(Nw,"torch.nn.Module"),Nw.forEach(t),Ly=d(Fh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Fh.forEach(t),Ky=p(Fa),Re=s(Fa,"DIV",{class:!0});var Vt=r(Re);T(Ls.$$.fragment,Vt),eb=p(Vt),wo=s(Vt,"P",{});var yd=r(wo);tb=d(yd,"The "),Di=s(yd,"A",{href:!0});var Rw=r(Di);ob=d(Rw,"MBartForConditionalGeneration"),Rw.forEach(t),nb=d(yd," forward method, overrides the "),dc=s(yd,"CODE",{});var Xw=r(dc);ab=d(Xw,"__call__"),Xw.forEach(t),sb=d(yd," special method."),yd.forEach(t),rb=p(Vt),T(Mn.$$.fragment,Vt),ib=p(Vt),T(Tn.$$.fragment,Vt),db=p(Vt),T(vn.$$.fragment,Vt),Vt.forEach(t),Fa.forEach(t),gu=p(o),Jo=s(o,"H2",{class:!0});var Uh=r(Jo);kn=s(Uh,"A",{id:!0,class:!0,href:!0});var Vw=r(kn);lc=s(Vw,"SPAN",{});var Sw=r(lc);T(Ks.$$.fragment,Sw),Sw.forEach(t),Vw.forEach(t),lb=p(Uh),cc=s(Uh,"SPAN",{});var Aw=r(cc);cb=d(Aw,"MBartForQuestionAnswering"),Aw.forEach(t),Uh.forEach(t),_u=p(o),xe=s(o,"DIV",{class:!0});var St=r(xe);T(er.$$.fragment,St),pb=p(St),Fo=s(St,"P",{});var bd=r(Fo);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 Yw=r(pc);hb=d(Yw,"span start logits"),Yw.forEach(t),mb=d(bd," and "),uc=s(bd,"CODE",{});var Qw=r(uc);fb=d(Qw,"span end logits"),Qw.forEach(t),gb=d(bd,")."),bd.forEach(t),_b=p(St),tr=s(St,"P",{});var jh=r(tr);yb=d(jh,"This model inherits from "),Hi=s(jh,"A",{href:!0});var Ow=r(Hi);bb=d(Ow,"PreTrainedModel"),Ow.forEach(t),Mb=d(jh,`. 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.)`),jh.forEach(t),Tb=p(St),or=s(St,"P",{});var Bh=r(or);vb=d(Bh,"This model is also a PyTorch "),nr=s(Bh,"A",{href:!0,rel:!0});var Pw=r(nr);kb=d(Pw,"torch.nn.Module"),Pw.forEach(t),wb=d(Bh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Bh.forEach(t),Jb=p(St),ct=s(St,"DIV",{class:!0});var Ua=r(ct);T(ar.$$.fragment,Ua),Fb=p(Ua),Uo=s(Ua,"P",{});var Md=r(Uo);Ub=d(Md,"The "),Li=s(Md,"A",{href:!0});var Dw=r(Li);jb=d(Dw,"MBartForQuestionAnswering"),Dw.forEach(t),Bb=d(Md," forward method, overrides the "),hc=s(Md,"CODE",{});var Hw=r(hc);zb=d(Hw,"__call__"),Hw.forEach(t),$b=d(Md," special method."),Md.forEach(t),xb=p(Ua),T(wn.$$.fragment,Ua),Eb=p(Ua),T(Jn.$$.fragment,Ua),Ua.forEach(t),St.forEach(t),yu=p(o),jo=s(o,"H2",{class:!0});var zh=r(jo);Fn=s(zh,"A",{id:!0,class:!0,href:!0});var Lw=r(Fn);mc=s(Lw,"SPAN",{});var Kw=r(mc);T(sr.$$.fragment,Kw),Kw.forEach(t),Lw.forEach(t),Cb=p(zh),fc=s(zh,"SPAN",{});var e2=r(fc);qb=d(e2,"MBartForSequenceClassification"),e2.forEach(t),zh.forEach(t),bu=p(o),Ee=s(o,"DIV",{class:!0});var At=r(Ee);T(rr.$$.fragment,At),Ib=p(At),gc=s(At,"P",{});var t2=r(gc);Zb=d(t2,`MBart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),t2.forEach(t),Gb=p(At),ir=s(At,"P",{});var $h=r(ir);Wb=d($h,"This model inherits from "),Ki=s($h,"A",{href:!0});var o2=r(Ki);Nb=d(o2,"PreTrainedModel"),o2.forEach(t),Rb=d($h,`. 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.)`),$h.forEach(t),Xb=p(At),dr=s(At,"P",{});var xh=r(dr);Vb=d(xh,"This model is also a PyTorch "),lr=s(xh,"A",{href:!0,rel:!0});var n2=r(lr);Sb=d(n2,"torch.nn.Module"),n2.forEach(t),Ab=d(xh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),xh.forEach(t),Yb=p(At),Xe=s(At,"DIV",{class:!0});var Yt=r(Xe);T(cr.$$.fragment,Yt),Qb=p(Yt),Bo=s(Yt,"P",{});var Td=r(Bo);Ob=d(Td,"The "),ed=s(Td,"A",{href:!0});var a2=r(ed);Pb=d(a2,"MBartForSequenceClassification"),a2.forEach(t),Db=d(Td," forward method, overrides the "),_c=s(Td,"CODE",{});var s2=r(_c);Hb=d(s2,"__call__"),s2.forEach(t),Lb=d(Td," special method."),Td.forEach(t),Kb=p(Yt),T(Un.$$.fragment,Yt),eM=p(Yt),T(jn.$$.fragment,Yt),tM=p(Yt),T(Bn.$$.fragment,Yt),Yt.forEach(t),At.forEach(t),Mu=p(o),zo=s(o,"H2",{class:!0});var Eh=r(zo);zn=s(Eh,"A",{id:!0,class:!0,href:!0});var r2=r(zn);yc=s(r2,"SPAN",{});var i2=r(yc);T(pr.$$.fragment,i2),i2.forEach(t),r2.forEach(t),oM=p(Eh),bc=s(Eh,"SPAN",{});var d2=r(bc);nM=d(d2,"MBartForCausalLM"),d2.forEach(t),Eh.forEach(t),Tu=p(o),$o=s(o,"DIV",{class:!0});var Ch=r($o);T(ur.$$.fragment,Ch),aM=p(Ch),$n=s(Ch,"DIV",{class:!0});var qh=r($n);T(hr.$$.fragment,qh),sM=p(qh),T(xn.$$.fragment,qh),qh.forEach(t),Ch.forEach(t),vu=p(o),xo=s(o,"H2",{class:!0});var Ih=r(xo);En=s(Ih,"A",{id:!0,class:!0,href:!0});var l2=r(En);Mc=s(l2,"SPAN",{});var c2=r(Mc);T(mr.$$.fragment,c2),c2.forEach(t),l2.forEach(t),rM=p(Ih),Tc=s(Ih,"SPAN",{});var p2=r(Tc);iM=d(p2,"TFMBartModel"),p2.forEach(t),Ih.forEach(t),ku=p(o),Ce=s(o,"DIV",{class:!0});var Qt=r(Ce);T(fr.$$.fragment,Qt),dM=p(Qt),gr=s(Qt,"P",{});var Zh=r(gr);lM=d(Zh,`The bare MBART Model outputting raw hidden-states without any specific head on top.
This model inherits from `),td=s(Zh,"A",{href:!0});var u2=r(td);cM=d(u2,"TFPreTrainedModel"),u2.forEach(t),pM=d(Zh,`. 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.)`),Zh.forEach(t),uM=p(Qt),_r=s(Qt,"P",{});var Gh=r(_r);hM=d(Gh,"This model is also a "),yr=s(Gh,"A",{href:!0,rel:!0});var h2=r(yr);mM=d(h2,"tf.keras.Model"),h2.forEach(t),fM=d(Gh,` 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.`),Gh.forEach(t),gM=p(Qt),T(Cn.$$.fragment,Qt),_M=p(Qt),pt=s(Qt,"DIV",{class:!0});var ja=r(pt);T(br.$$.fragment,ja),yM=p(ja),Eo=s(ja,"P",{});var vd=r(Eo);bM=d(vd,"The "),od=s(vd,"A",{href:!0});var m2=r(od);MM=d(m2,"TFMBartModel"),m2.forEach(t),TM=d(vd," forward method, overrides the "),vc=s(vd,"CODE",{});var f2=r(vc);vM=d(f2,"__call__"),f2.forEach(t),kM=d(vd," special method."),vd.forEach(t),wM=p(ja),T(qn.$$.fragment,ja),JM=p(ja),T(In.$$.fragment,ja),ja.forEach(t),Qt.forEach(t),wu=p(o),Co=s(o,"H2",{class:!0});var Wh=r(Co);Zn=s(Wh,"A",{id:!0,class:!0,href:!0});var g2=r(Zn);kc=s(g2,"SPAN",{});var _2=r(kc);T(Mr.$$.fragment,_2),_2.forEach(t),g2.forEach(t),FM=p(Wh),wc=s(Wh,"SPAN",{});var y2=r(wc);UM=d(y2,"TFMBartForConditionalGeneration"),y2.forEach(t),Wh.forEach(t),Ju=p(o),qe=s(o,"DIV",{class:!0});var Ot=r(qe);T(Tr.$$.fragment,Ot),jM=p(Ot),vr=s(Ot,"P",{});var Nh=r(vr);BM=d(Nh,`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(Nh,"A",{href:!0});var b2=r(nd);zM=d(b2,"TFPreTrainedModel"),b2.forEach(t),$M=d(Nh,`. 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.)`),Nh.forEach(t),xM=p(Ot),kr=s(Ot,"P",{});var Rh=r(kr);EM=d(Rh,"This model is also a "),wr=s(Rh,"A",{href:!0,rel:!0});var M2=r(wr);CM=d(M2,"tf.keras.Model"),M2.forEach(t),qM=d(Rh,` 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.`),Rh.forEach(t),IM=p(Ot),T(Gn.$$.fragment,Ot),ZM=p(Ot),Ve=s(Ot,"DIV",{class:!0});var Pt=r(Ve);T(Jr.$$.fragment,Pt),GM=p(Pt),qo=s(Pt,"P",{});var kd=r(qo);WM=d(kd,"The "),ad=s(kd,"A",{href:!0});var T2=r(ad);NM=d(T2,"TFMBartForConditionalGeneration"),T2.forEach(t),RM=d(kd," forward method, overrides the "),Jc=s(kd,"CODE",{});var v2=r(Jc);XM=d(v2,"__call__"),v2.forEach(t),VM=d(kd," special method."),kd.forEach(t),SM=p(Pt),T(Wn.$$.fragment,Pt),AM=p(Pt),T(Nn.$$.fragment,Pt),YM=p(Pt),T(Rn.$$.fragment,Pt),Pt.forEach(t),Ot.forEach(t),Fu=p(o),Io=s(o,"H2",{class:!0});var Xh=r(Io);Xn=s(Xh,"A",{id:!0,class:!0,href:!0});var k2=r(Xn);Fc=s(k2,"SPAN",{});var w2=r(Fc);T(Fr.$$.fragment,w2),w2.forEach(t),k2.forEach(t),QM=p(Xh),Uc=s(Xh,"SPAN",{});var J2=r(Uc);OM=d(J2,"FlaxMBartModel"),J2.forEach(t),Xh.forEach(t),Uu=p(o),O=s(o,"DIV",{class:!0});var Me=r(O);T(Ur.$$.fragment,Me),PM=p(Me),jr=s(Me,"P",{});var Vh=r(jr);DM=d(Vh,`The bare MBart Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),sd=s(Vh,"A",{href:!0});var F2=r(sd);HM=d(F2,"FlaxPreTrainedModel"),F2.forEach(t),LM=d(Vh,`. 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.)`),Vh.forEach(t),KM=p(Me),Br=s(Me,"P",{});var Sh=r(Br);eT=d(Sh,`This model is also a Flax Linen
`),zr=s(Sh,"A",{href:!0,rel:!0});var U2=r(zr);tT=d(U2,"flax.nn.Module"),U2.forEach(t),oT=d(Sh,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Sh.forEach(t),nT=p(Me),jc=s(Me,"P",{});var j2=r(jc);aT=d(j2,"Finally, this model supports inherent JAX features such as:"),j2.forEach(t),sT=p(Me),Ct=s(Me,"UL",{});var Ba=r(Ct);Bc=s(Ba,"LI",{});var B2=r(Bc);$r=s(B2,"A",{href:!0,rel:!0});var z2=r($r);rT=d(z2,"Just-In-Time (JIT) compilation"),z2.forEach(t),B2.forEach(t),iT=p(Ba),zc=s(Ba,"LI",{});var $2=r(zc);xr=s($2,"A",{href:!0,rel:!0});var x2=r(xr);dT=d(x2,"Automatic Differentiation"),x2.forEach(t),$2.forEach(t),lT=p(Ba),$c=s(Ba,"LI",{});var E2=r($c);Er=s(E2,"A",{href:!0,rel:!0});var C2=r(Er);cT=d(C2,"Vectorization"),C2.forEach(t),E2.forEach(t),pT=p(Ba),xc=s(Ba,"LI",{});var q2=r(xc);Cr=s(q2,"A",{href:!0,rel:!0});var I2=r(Cr);uT=d(I2,"Parallelization"),I2.forEach(t),q2.forEach(t),Ba.forEach(t),hT=p(Me),ut=s(Me,"DIV",{class:!0});var za=r(ut);T(qr.$$.fragment,za),mT=p(za),Zo=s(za,"P",{});var wd=r(Zo);fT=d(wd,"The "),Ec=s(wd,"CODE",{});var Z2=r(Ec);gT=d(Z2,"FlaxMBartPreTrainedModel"),Z2.forEach(t),_T=d(wd," forward method, overrides the "),Cc=s(wd,"CODE",{});var G2=r(Cc);yT=d(G2,"__call__"),G2.forEach(t),bT=d(wd," special method."),wd.forEach(t),MT=p(za),T(Vn.$$.fragment,za),TT=p(za),T(Sn.$$.fragment,za),za.forEach(t),vT=p(Me),An=s(Me,"DIV",{class:!0});var Ah=r(An);T(Ir.$$.fragment,Ah),kT=p(Ah),T(Yn.$$.fragment,Ah),Ah.forEach(t),wT=p(Me),Qn=s(Me,"DIV",{class:!0});var Yh=r(Qn);T(Zr.$$.fragment,Yh),JT=p(Yh),T(On.$$.fragment,Yh),Yh.forEach(t),Me.forEach(t),ju=p(o),Go=s(o,"H2",{class:!0});var Qh=r(Go);Pn=s(Qh,"A",{id:!0,class:!0,href:!0});var W2=r(Pn);qc=s(W2,"SPAN",{});var N2=r(qc);T(Gr.$$.fragment,N2),N2.forEach(t),W2.forEach(t),FT=p(Qh),Ic=s(Qh,"SPAN",{});var R2=r(Ic);UT=d(R2,"FlaxMBartForConditionalGeneration"),R2.forEach(t),Qh.forEach(t),Bu=p(o),P=s(o,"DIV",{class:!0});var Te=r(P);T(Wr.$$.fragment,Te),jT=p(Te),Nr=s(Te,"P",{});var Oh=r(Nr);BT=d(Oh,`The MMBart Model with a language modeling head. Can be used for summarization.
This model inherits from `),rd=s(Oh,"A",{href:!0});var X2=r(rd);zT=d(X2,"FlaxPreTrainedModel"),X2.forEach(t),$T=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),xT=p(Te),Rr=s(Te,"P",{});var Ph=r(Rr);ET=d(Ph,`This model is also a Flax Linen
`),Xr=s(Ph,"A",{href:!0,rel:!0});var V2=r(Xr);CT=d(V2,"flax.nn.Module"),V2.forEach(t),qT=d(Ph,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Ph.forEach(t),IT=p(Te),Zc=s(Te,"P",{});var S2=r(Zc);ZT=d(S2,"Finally, this model supports inherent JAX features such as:"),S2.forEach(t),GT=p(Te),qt=s(Te,"UL",{});var $a=r(qt);Gc=s($a,"LI",{});var A2=r(Gc);Vr=s(A2,"A",{href:!0,rel:!0});var Y2=r(Vr);WT=d(Y2,"Just-In-Time (JIT) compilation"),Y2.forEach(t),A2.forEach(t),NT=p($a),Wc=s($a,"LI",{});var Q2=r(Wc);Sr=s(Q2,"A",{href:!0,rel:!0});var O2=r(Sr);RT=d(O2,"Automatic Differentiation"),O2.forEach(t),Q2.forEach(t),XT=p($a),Nc=s($a,"LI",{});var P2=r(Nc);Ar=s(P2,"A",{href:!0,rel:!0});var D2=r(Ar);VT=d(D2,"Vectorization"),D2.forEach(t),P2.forEach(t),ST=p($a),Rc=s($a,"LI",{});var H2=r(Rc);Yr=s(H2,"A",{href:!0,rel:!0});var L2=r(Yr);AT=d(L2,"Parallelization"),L2.forEach(t),H2.forEach(t),$a.forEach(t),YT=p(Te),Se=s(Te,"DIV",{class:!0});var Dt=r(Se);T(Qr.$$.fragment,Dt),QT=p(Dt),Wo=s(Dt,"P",{});var Jd=r(Wo);OT=d(Jd,"The "),Xc=s(Jd,"CODE",{});var K2=r(Xc);PT=d(K2,"FlaxMBartPreTrainedModel"),K2.forEach(t),DT=d(Jd," forward method, overrides the "),Vc=s(Jd,"CODE",{});var e1=r(Vc);HT=d(e1,"__call__"),e1.forEach(t),LT=d(Jd," special method."),Jd.forEach(t),KT=p(Dt),T(Dn.$$.fragment,Dt),ev=p(Dt),T(Hn.$$.fragment,Dt),tv=p(Dt),T(Ln.$$.fragment,Dt),Dt.forEach(t),ov=p(Te),Kn=s(Te,"DIV",{class:!0});var Dh=r(Kn);T(Or.$$.fragment,Dh),nv=p(Dh),T(ea.$$.fragment,Dh),Dh.forEach(t),av=p(Te),ta=s(Te,"DIV",{class:!0});var Hh=r(ta);T(Pr.$$.fragment,Hh),sv=p(Hh),T(oa.$$.fragment,Hh),Hh.forEach(t),Te.forEach(t),zu=p(o),No=s(o,"H2",{class:!0});var Lh=r(No);na=s(Lh,"A",{id:!0,class:!0,href:!0});var t1=r(na);Sc=s(t1,"SPAN",{});var o1=r(Sc);T(Dr.$$.fragment,o1),o1.forEach(t),t1.forEach(t),rv=p(Lh),Ac=s(Lh,"SPAN",{});var n1=r(Ac);iv=d(n1,"FlaxMBartForSequenceClassification"),n1.forEach(t),Lh.forEach(t),$u=p(o),X=s(o,"DIV",{class:!0});var ae=r(X);T(Hr.$$.fragment,ae),dv=p(ae),Yc=s(ae,"P",{});var a1=r(Yc);lv=d(a1,`MBart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),a1.forEach(t),cv=p(ae),Lr=s(ae,"P",{});var Kh=r(Lr);pv=d(Kh,"This model inherits from "),id=s(Kh,"A",{href:!0});var s1=r(id);uv=d(s1,"FlaxPreTrainedModel"),s1.forEach(t),hv=d(Kh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Kh.forEach(t),mv=p(ae),Kr=s(ae,"P",{});var em=r(Kr);fv=d(em,`This model is also a Flax Linen
`),ei=s(em,"A",{href:!0,rel:!0});var r1=r(ei);gv=d(r1,"flax.nn.Module"),r1.forEach(t),_v=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),yv=p(ae),Qc=s(ae,"P",{});var i1=r(Qc);bv=d(i1,"Finally, this model supports inherent JAX features such as:"),i1.forEach(t),Mv=p(ae),It=s(ae,"UL",{});var xa=r(It);Oc=s(xa,"LI",{});var d1=r(Oc);ti=s(d1,"A",{href:!0,rel:!0});var l1=r(ti);Tv=d(l1,"Just-In-Time (JIT) compilation"),l1.forEach(t),d1.forEach(t),vv=p(xa),Pc=s(xa,"LI",{});var c1=r(Pc);oi=s(c1,"A",{href:!0,rel:!0});var p1=r(oi);kv=d(p1,"Automatic Differentiation"),p1.forEach(t),c1.forEach(t),wv=p(xa),Dc=s(xa,"LI",{});var u1=r(Dc);ni=s(u1,"A",{href:!0,rel:!0});var h1=r(ni);Jv=d(h1,"Vectorization"),h1.forEach(t),u1.forEach(t),Fv=p(xa),Hc=s(xa,"LI",{});var m1=r(Hc);ai=s(m1,"A",{href:!0,rel:!0});var f1=r(ai);Uv=d(f1,"Parallelization"),f1.forEach(t),m1.forEach(t),xa.forEach(t),jv=p(ae),ht=s(ae,"DIV",{class:!0});var Ea=r(ht);T(si.$$.fragment,Ea),Bv=p(Ea),Ro=s(Ea,"P",{});var Fd=r(Ro);zv=d(Fd,"The "),Lc=s(Fd,"CODE",{});var g1=r(Lc);$v=d(g1,"FlaxMBartPreTrainedModel"),g1.forEach(t),xv=d(Fd," forward method, overrides the "),Kc=s(Fd,"CODE",{});var _1=r(Kc);Ev=d(_1,"__call__"),_1.forEach(t),Cv=d(Fd," special method."),Fd.forEach(t),qv=p(Ea),T(aa.$$.fragment,Ea),Iv=p(Ea),T(sa.$$.fragment,Ea),Ea.forEach(t),Zv=p(ae),ra=s(ae,"DIV",{class:!0});var tm=r(ra);T(ri.$$.fragment,tm),Gv=p(tm),T(ia.$$.fragment,tm),tm.forEach(t),Wv=p(ae),da=s(ae,"DIV",{class:!0});var om=r(da);T(ii.$$.fragment,om),Nv=p(om),T(la.$$.fragment,om),om.forEach(t),ae.forEach(t),xu=p(o),Xo=s(o,"H2",{class:!0});var nm=r(Xo);ca=s(nm,"A",{id:!0,class:!0,href:!0});var y1=r(ca);ep=s(y1,"SPAN",{});var b1=r(ep);T(di.$$.fragment,b1),b1.forEach(t),y1.forEach(t),Rv=p(nm),tp=s(nm,"SPAN",{});var M1=r(tp);Xv=d(M1,"FlaxMBartForQuestionAnswering"),M1.forEach(t),nm.forEach(t),Eu=p(o),V=s(o,"DIV",{class:!0});var se=r(V);T(li.$$.fragment,se),Vv=p(se),Vo=s(se,"P",{});var Ud=r(Vo);Sv=d(Ud,`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(Ud,"CODE",{});var T1=r(op);Av=d(T1,"span start logits"),T1.forEach(t),Yv=d(Ud," and "),np=s(Ud,"CODE",{});var v1=r(np);Qv=d(v1,"span end logits"),v1.forEach(t),Ov=d(Ud,")."),Ud.forEach(t),Pv=p(se),ci=s(se,"P",{});var am=r(ci);Dv=d(am,"This model inherits from "),dd=s(am,"A",{href:!0});var k1=r(dd);Hv=d(k1,"FlaxPreTrainedModel"),k1.forEach(t),Lv=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),Kv=p(se),pi=s(se,"P",{});var sm=r(pi);ek=d(sm,`This model is also a Flax Linen
`),ui=s(sm,"A",{href:!0,rel:!0});var w1=r(ui);tk=d(w1,"flax.nn.Module"),w1.forEach(t),ok=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),nk=p(se),ap=s(se,"P",{});var J1=r(ap);ak=d(J1,"Finally, this model supports inherent JAX features such as:"),J1.forEach(t),sk=p(se),Zt=s(se,"UL",{});var Ca=r(Zt);sp=s(Ca,"LI",{});var F1=r(sp);hi=s(F1,"A",{href:!0,rel:!0});var U1=r(hi);rk=d(U1,"Just-In-Time (JIT) compilation"),U1.forEach(t),F1.forEach(t),ik=p(Ca),rp=s(Ca,"LI",{});var j1=r(rp);mi=s(j1,"A",{href:!0,rel:!0});var B1=r(mi);dk=d(B1,"Automatic Differentiation"),B1.forEach(t),j1.forEach(t),lk=p(Ca),ip=s(Ca,"LI",{});var z1=r(ip);fi=s(z1,"A",{href:!0,rel:!0});var $1=r(fi);ck=d($1,"Vectorization"),$1.forEach(t),z1.forEach(t),pk=p(Ca),dp=s(Ca,"LI",{});var x1=r(dp);gi=s(x1,"A",{href:!0,rel:!0});var E1=r(gi);uk=d(E1,"Parallelization"),E1.forEach(t),x1.forEach(t),Ca.forEach(t),hk=p(se),mt=s(se,"DIV",{class:!0});var qa=r(mt);T(_i.$$.fragment,qa),mk=p(qa),So=s(qa,"P",{});var jd=r(So);fk=d(jd,"The "),lp=s(jd,"CODE",{});var C1=r(lp);gk=d(C1,"FlaxMBartPreTrainedModel"),C1.forEach(t),_k=d(jd," forward method, overrides the "),cp=s(jd,"CODE",{});var q1=r(cp);yk=d(q1,"__call__"),q1.forEach(t),bk=d(jd," special method."),jd.forEach(t),Mk=p(qa),T(pa.$$.fragment,qa),Tk=p(qa),T(ua.$$.fragment,qa),qa.forEach(t),vk=p(se),ha=s(se,"DIV",{class:!0});var rm=r(ha);T(yi.$$.fragment,rm),kk=p(rm),T(ma.$$.fragment,rm),rm.forEach(t),wk=p(se),fa=s(se,"DIV",{class:!0});var im=r(fa);T(bi.$$.fragment,im),Jk=p(im),T(ga.$$.fragment,im),im.forEach(t),se.forEach(t),this.h()},h(){m(l,"name","hf:doc:metadata"),m(l,"content",JSON.stringify(BJ)),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"),I1(he.src,z="https://img.shields.io/badge/All_model_pages-mbart-blueviolet")||m(he,"src",z),m(Ie,"href","https://huggingface.co/models?filter=mbart"),m(Ze,"alt","Spaces"),I1(Ze.src,Wt="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||m(Ze,"src",Wt),m(ee,"href","https://huggingface.co/spaces/docs-demos/mbart-large-50-one-to-many-mmt"),m(Y,"class","flex flex-wrap space-x-1"),m(ke,"href","https://github.com/huggingface/transformers/issues/new?assignees=&labels=&template=bug-report.md&title"),m(ke,"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(H,"href","https://arxiv.org/abs/2001.08210"),m(H,"rel","nofollow"),m(Ue,"href","https://huggingface.co/valhalla"),m(Ue,"rel","nofollow"),m(je,"href","https://github.com/pytorch/fairseq/tree/master/examples/mbart"),m(je,"rel","nofollow"),m(I,"id","training-of-mbart"),m(I,"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(I,"href","#training-of-mbart"),m(L,"class","relative group"),m(ze,"href","/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__"),m(Yo,"id","overview-of-mbart50"),m(Yo,"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(Yo,"href","#overview-of-mbart50"),m(ro,"class","relative group"),m(Na,"href","https://arxiv.org/abs/2008.00401"),m(Na,"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(zi,"href","/docs/transformers/v4.30.0/en/model_doc/mbart#transformers.MBart50Tokenizer"),m(Po,"id","documentation-resources"),m(Po,"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(Po,"href","#documentation-resources"),m(lo,"class","relative group"),m(Ei,"href","../tasks/sequence_classification"),m(Ci,"href","../tasks/question_answering"),m(qi,"href","../tasks/language_modeling"),m(Ii,"href","../tasks/masked_language_modeling"),m(Zi,"href","../tasks/translation"),m(Gi,"href","../tasks/summarization"),m(Do,"id","transformers.MBartConfig"),m(Do,"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(Do,"href","#transformers.MBartConfig"),m(co,"class","relative group"),m(Wi,"href","/docs/transformers/v4.30.0/en/model_doc/mbart#transformers.MBartModel"),m(Oa,"href","https://huggingface.co/facebook/mbart-large-cc25"),m(Oa,"rel","nofollow"),m(Ni,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),m(Ri,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),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(Lo,"id","transformers.MBartTokenizer"),m(Lo,"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(Lo,"href","#transformers.MBartTokenizer"),m(ho,"class","relative group"),m(Xi,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaTokenizer"),m(Vi,"href","/docs/transformers/v4.30.0/en/model_doc/xlnet#transformers.XLNetTokenizer"),m(Ha,"href","https://github.com/google/sentencepiece"),m(Ha,"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(Si,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),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(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(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(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(yo,"class","relative group"),m(ys,"href","https://github.com/google/sentencepiece"),m(ys,"rel","nofollow"),m(Ai,"href","/docs/transformers/v4.30.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(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(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(xs,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=BPE#models"),m(xs,"rel","nofollow"),m(Yi,"href","/docs/transformers/v4.30.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(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(K,"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.MBartModel"),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.MBartModel"),m(To,"class","relative group"),m(Qi,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),m(As,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(As,"rel","nofollow"),m(Oi,"href","/docs/transformers/v4.30.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(Ke,"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(ko,"class","relative group"),m(Pi,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),m(Hs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Hs,"rel","nofollow"),m(Di,"href","/docs/transformers/v4.30.0/en/model_doc/mbart#transformers.MBartForConditionalGeneration"),m(Re,"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(kn,"id","transformers.MBartForQuestionAnswering"),m(kn,"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(kn,"href","#transformers.MBartForQuestionAnswering"),m(Jo,"class","relative group"),m(Hi,"href","/docs/transformers/v4.30.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(Li,"href","/docs/transformers/v4.30.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(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Fn,"id","transformers.MBartForSequenceClassification"),m(Fn,"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(Fn,"href","#transformers.MBartForSequenceClassification"),m(jo,"class","relative group"),m(Ki,"href","/docs/transformers/v4.30.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.30.0/en/model_doc/mbart#transformers.MBartForSequenceClassification"),m(Xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(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(zn,"id","transformers.MBartForCausalLM"),m(zn,"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(zn,"href","#transformers.MBartForCausalLM"),m(zo,"class","relative group"),m($n,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m($o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(En,"id","transformers.TFMBartModel"),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.TFMBartModel"),m(xo,"class","relative group"),m(td,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),m(yr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(yr,"rel","nofollow"),m(od,"href","/docs/transformers/v4.30.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(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(Zn,"id","transformers.TFMBartForConditionalGeneration"),m(Zn,"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(Zn,"href","#transformers.TFMBartForConditionalGeneration"),m(Co,"class","relative group"),m(nd,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),m(wr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(wr,"rel","nofollow"),m(ad,"href","/docs/transformers/v4.30.0/en/model_doc/mbart#transformers.TFMBartForConditionalGeneration"),m(Ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Xn,"id","transformers.FlaxMBartModel"),m(Xn,"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(Xn,"href","#transformers.FlaxMBartModel"),m(Io,"class","relative group"),m(sd,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(zr,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(zr,"rel","nofollow"),m($r,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m($r,"rel","nofollow"),m(xr,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(xr,"rel","nofollow"),m(Er,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(Er,"rel","nofollow"),m(Cr,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(Cr,"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(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(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(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Pn,"id","transformers.FlaxMBartForConditionalGeneration"),m(Pn,"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(Pn,"href","#transformers.FlaxMBartForConditionalGeneration"),m(Go,"class","relative group"),m(rd,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Xr,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(Xr,"rel","nofollow"),m(Vr,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(Vr,"rel","nofollow"),m(Sr,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(Sr,"rel","nofollow"),m(Ar,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(Ar,"rel","nofollow"),m(Yr,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(Yr,"rel","nofollow"),m(Se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Kn,"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(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(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(No,"class","relative group"),m(id,"href","/docs/transformers/v4.30.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(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(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(Xo,"class","relative group"),m(dd,"href","/docs/transformers/v4.30.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(gi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(gi,"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(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(o,g){e(document.head,l),_(o,b,g),_(o,f,g),e(f,h),e(h,y),v(n,y,null),e(f,u),e(f,B),e(B,bt),_(o,ot,g),_(o,Y,g),e(Y,Ie),e(Ie,he),e(Y,Mt),e(Y,ee),e(ee,Ze),_(o,me,g),_(o,re,g),e(re,Ye),e(Ye,ve),e(re,Tt),e(re,ke),e(ke,we),e(re,vt),_(o,nt,g),_(o,Q,g),e(Q,fe),e(fe,Qe),v(ie,Qe,null),e(Q,Z),e(Q,G),e(G,kt),_(o,ge,g),_(o,_e,g),e(_e,wt),e(_e,H),e(H,Jt),e(_e,Ft),_(o,S,g),_(o,Ge,g),e(Ge,Je),_(o,at,g),_(o,de,g),e(de,Fe),e(de,Ue),e(Ue,Ut),e(de,le),e(de,je),e(je,Be),_(o,st,g),_(o,L,g),e(L,I),e(I,Oe),v(W,Oe,null),e(L,jt),e(L,Pe),e(Pe,U),_(o,$,g),_(o,D,g),e(D,De),e(D,Bt),e(Bt,Ht),e(D,E),e(D,zt),e(zt,Lt),e(D,Kt),e(D,$t),e($t,eo),e(D,ce),e(D,pe),e(pe,to),e(D,oo),_(o,ye,g),_(o,te,g),e(te,no),e(te,ze),e(ze,xt),e(xt,He),e(ze,ao),e(te,dm),e(te,Bd),e(Bd,lm),e(te,cm),e(te,zd),e(zd,pm),e(te,um),_(o,Wp,g),_(o,Fi,g),e(Fi,$d),e($d,hm),_(o,Np,g),v(Ia,o,g),_(o,Rp,g),_(o,Ui,g),e(Ui,Za),e(Za,xd),e(xd,mm),e(Za,fm),e(Za,so),e(so,gm),e(so,Ed),e(Ed,_m),e(so,ym),e(so,Cd),e(Cd,bm),e(so,Mm),_(o,Xp,g),v(Ga,o,g),_(o,Vp,g),_(o,ro,g),e(ro,Yo),e(Yo,qd),v(Wa,qd,null),e(ro,Tm),e(ro,Id),e(Id,vm),_(o,Sp,g),_(o,Nt,g),e(Nt,km),e(Nt,Na),e(Na,wm),e(Nt,Jm),e(Nt,Zd),e(Zd,Fm),e(Nt,Um),_(o,Ap,g),_(o,ji,g),e(ji,jm),_(o,Yp,g),_(o,Bi,g),e(Bi,Gd),e(Gd,Bm),_(o,Qp,g),_(o,io,g),e(io,Qo),e(Qo,Wd),v(Ra,Wd,null),e(io,zm),e(io,Nd),e(Nd,$m),_(o,Op,g),_(o,rt,g),e(rt,xm),e(rt,Rd),e(Rd,Em),e(rt,Cm),e(rt,Xd),e(Xd,qm),e(rt,Im),e(rt,Vd),e(Vd,Zm),e(rt,Gm),_(o,Pp,g),_(o,Oo,g),e(Oo,Wm),e(Oo,zi),e(zi,Nm),e(Oo,Rm),_(o,Dp,g),_(o,$i,g),e($i,Sd),e(Sd,Xm),_(o,Hp,g),v(Xa,o,g),_(o,Lp,g),_(o,xi,g),e(xi,Va),e(Va,Ad),e(Ad,Vm),e(Va,Sm),e(Va,$e),e($e,Am),e($e,Yd),e(Yd,Ym),e($e,Qm),e($e,Qd),e(Qd,Om),e($e,Pm),e($e,Od),e(Od,Dm),e($e,Hm),e($e,Pd),e(Pd,Lm),e($e,Km),e($e,Dd),e(Dd,ef),e($e,tf),_(o,Kp,g),v(Sa,o,g),_(o,eu,g),_(o,lo,g),e(lo,Po),e(Po,Hd),v(Aa,Hd,null),e(lo,of),e(lo,Ld),e(Ld,nf),_(o,tu,g),_(o,be,g),e(be,Kd),e(Kd,Ei),e(Ei,af),e(be,sf),e(be,el),e(el,Ci),e(Ci,rf),e(be,df),e(be,tl),e(tl,qi),e(qi,lf),e(be,cf),e(be,ol),e(ol,Ii),e(Ii,pf),e(be,uf),e(be,nl),e(nl,Zi),e(Zi,hf),e(be,mf),e(be,al),e(al,Gi),e(Gi,ff),_(o,ou,g),_(o,co,g),e(co,Do),e(Do,sl),v(Ya,sl,null),e(co,gf),e(co,rl),e(rl,_f),_(o,nu,g),_(o,Le,g),v(Qa,Le,null),e(Le,yf),e(Le,po),e(po,bf),e(po,Wi),e(Wi,Mf),e(po,Tf),e(po,Oa),e(Oa,vf),e(po,kf),e(Le,wf),e(Le,uo),e(uo,Jf),e(uo,Ni),e(Ni,Ff),e(uo,Uf),e(uo,Ri),e(Ri,jf),e(uo,Bf),e(Le,zf),v(Ho,Le,null),_(o,au,g),_(o,ho,g),e(ho,Lo),e(Lo,il),v(Pa,il,null),e(ho,$f),e(ho,dl),e(dl,xf),_(o,su,g),_(o,ue,g),v(Da,ue,null),e(ue,Ef),e(ue,ll),e(ll,Cf),e(ue,qf),e(ue,Et),e(Et,If),e(Et,Xi),e(Xi,Zf),e(Et,Gf),e(Et,Vi),e(Vi,Wf),e(Et,Nf),e(Et,Ha),e(Ha,Rf),e(Et,Xf),e(ue,Vf),e(ue,mo),e(mo,Sf),e(mo,cl),e(cl,Af),e(mo,Yf),e(mo,pl),e(pl,Qf),e(mo,Of),e(ue,Pf),v(Ko,ue,null),e(ue,Df),e(ue,it),v(La,it,null),e(it,Hf),e(it,Ka),e(Ka,Lf),e(Ka,ul),e(ul,Kf),e(Ka,eg),e(it,tg),e(it,es),e(es,ts),e(ts,hl),e(hl,og),e(ts,ng),e(ts,ml),e(ml,ag),e(es,sg),e(es,os),e(os,fl),e(fl,rg),e(os,ig),e(os,gl),e(gl,dg),e(it,lg),e(it,_l),e(_l,cg),_(o,ru,g),_(o,fo,g),e(fo,en),e(en,yl),v(ns,yl,null),e(fo,pg),e(fo,bl),e(bl,ug),_(o,iu,g),_(o,N,g),v(as,N,null),e(N,hg),e(N,go),e(go,mg),e(go,Ml),e(Ml,fg),e(go,gg),e(go,ss),e(ss,_g),e(go,yg),e(N,bg),e(N,rs),e(rs,Mg),e(rs,Si),e(Si,Tg),e(rs,vg),e(N,kg),e(N,_o),e(_o,wg),e(_o,Tl),e(Tl,Jg),e(_o,Fg),e(_o,vl),e(vl,Ug),e(_o,jg),e(N,Bg),v(tn,N,null),e(N,zg),e(N,We),v(is,We,null),e(We,$g),e(We,kl),e(kl,xg),e(We,Eg),e(We,ds),e(ds,Cg),e(ds,wl),e(wl,qg),e(ds,Ig),e(We,Zg),e(We,ls),e(ls,cs),e(cs,Jl),e(Jl,Gg),e(cs,Wg),e(cs,Fl),e(Fl,Ng),e(ls,Rg),e(ls,ps),e(ps,Ul),e(Ul,Xg),e(ps,Vg),e(ps,jl),e(jl,Sg),e(We,Ag),e(We,Bl),e(Bl,Yg),e(N,Qg),e(N,on),v(us,on,null),e(on,Og),e(on,zl),e(zl,Pg),e(N,Dg),e(N,nn),v(hs,nn,null),e(nn,Hg),e(nn,$l),e($l,Lg),e(N,Kg),e(N,an),v(ms,an,null),e(an,e_),e(an,xl),e(xl,t_),_(o,du,g),_(o,yo,g),e(yo,sn),e(sn,El),v(fs,El,null),e(yo,o_),e(yo,Cl),e(Cl,n_),_(o,lu,g),_(o,R,g),v(gs,R,null),e(R,a_),e(R,_s),e(_s,s_),e(_s,ys),e(ys,r_),e(_s,i_),e(R,d_),e(R,bs),e(bs,l_),e(bs,Ai),e(Ai,c_),e(bs,p_),e(R,u_),v(rn,R,null),e(R,h_),e(R,dt),v(Ms,dt,null),e(dt,m_),e(dt,Ts),e(Ts,f_),e(Ts,ql),e(ql,g_),e(Ts,__),e(dt,y_),e(dt,vs),e(vs,ks),e(ks,Il),e(Il,b_),e(ks,M_),e(ks,Zl),e(Zl,T_),e(vs,v_),e(vs,ws),e(ws,Gl),e(Gl,k_),e(ws,w_),e(ws,Wl),e(Wl,J_),e(dt,F_),e(dt,Nl),e(Nl,U_),e(R,j_),e(R,dn),v(Js,dn,null),e(dn,B_),e(dn,Rl),e(Rl,z_),e(R,$_),e(R,ln),v(Fs,ln,null),e(ln,x_),e(ln,Us),e(Us,E_),e(Us,Xl),e(Xl,C_),e(Us,q_),e(R,I_),e(R,cn),v(js,cn,null),e(cn,Z_),e(cn,Vl),e(Vl,G_),e(R,W_),e(R,pn),v(Bs,pn,null),e(pn,N_),e(pn,Sl),e(Sl,R_),_(o,cu,g),_(o,bo,g),e(bo,un),e(un,Al),v(zs,Al,null),e(bo,X_),e(bo,Yl),e(Yl,V_),_(o,pu,g),_(o,K,g),v($s,K,null),e(K,S_),e(K,Mo),e(Mo,A_),e(Mo,Ql),e(Ql,Y_),e(Mo,Q_),e(Mo,xs),e(xs,O_),e(Mo,P_),e(K,D_),e(K,Es),e(Es,H_),e(Es,Yi),e(Yi,L_),e(Es,K_),e(K,ey),v(hn,K,null),e(K,ty),e(K,Ne),v(Cs,Ne,null),e(Ne,oy),e(Ne,Ol),e(Ol,ny),e(Ne,ay),e(Ne,qs),e(qs,sy),e(qs,Pl),e(Pl,ry),e(qs,iy),e(Ne,dy),e(Ne,Is),e(Is,Zs),e(Zs,Dl),e(Dl,ly),e(Zs,cy),e(Zs,Hl),e(Hl,py),e(Is,uy),e(Is,Gs),e(Gs,Ll),e(Ll,hy),e(Gs,my),e(Gs,Kl),e(Kl,fy),e(Ne,gy),e(Ne,ec),e(ec,_y),e(K,yy),e(K,mn),v(Ws,mn,null),e(mn,by),e(mn,tc),e(tc,My),e(K,Ty),e(K,fn),v(Ns,fn,null),e(fn,vy),e(fn,oc),e(oc,ky),_(o,uu,g),_(o,To,g),e(To,gn),e(gn,nc),v(Rs,nc,null),e(To,wy),e(To,ac),e(ac,Jy),_(o,hu,g),_(o,Ke,g),v(Xs,Ke,null),e(Ke,Fy),e(Ke,Vs),e(Vs,Uy),e(Vs,Qi),e(Qi,jy),e(Vs,By),e(Ke,zy),e(Ke,Ss),e(Ss,$y),e(Ss,As),e(As,xy),e(Ss,Ey),e(Ke,Cy),e(Ke,lt),v(Ys,lt,null),e(lt,qy),e(lt,vo),e(vo,Iy),e(vo,Oi),e(Oi,Zy),e(vo,Gy),e(vo,sc),e(sc,Wy),e(vo,Ny),e(lt,Ry),v(_n,lt,null),e(lt,Xy),v(yn,lt,null),_(o,mu,g),_(o,ko,g),e(ko,bn),e(bn,rc),v(Qs,rc,null),e(ko,Vy),e(ko,ic),e(ic,Sy),_(o,fu,g),_(o,et,g),v(Os,et,null),e(et,Ay),e(et,Ps),e(Ps,Yy),e(Ps,Pi),e(Pi,Qy),e(Ps,Oy),e(et,Py),e(et,Ds),e(Ds,Dy),e(Ds,Hs),e(Hs,Hy),e(Ds,Ly),e(et,Ky),e(et,Re),v(Ls,Re,null),e(Re,eb),e(Re,wo),e(wo,tb),e(wo,Di),e(Di,ob),e(wo,nb),e(wo,dc),e(dc,ab),e(wo,sb),e(Re,rb),v(Mn,Re,null),e(Re,ib),v(Tn,Re,null),e(Re,db),v(vn,Re,null),_(o,gu,g),_(o,Jo,g),e(Jo,kn),e(kn,lc),v(Ks,lc,null),e(Jo,lb),e(Jo,cc),e(cc,cb),_(o,_u,g),_(o,xe,g),v(er,xe,null),e(xe,pb),e(xe,Fo),e(Fo,ub),e(Fo,pc),e(pc,hb),e(Fo,mb),e(Fo,uc),e(uc,fb),e(Fo,gb),e(xe,_b),e(xe,tr),e(tr,yb),e(tr,Hi),e(Hi,bb),e(tr,Mb),e(xe,Tb),e(xe,or),e(or,vb),e(or,nr),e(nr,kb),e(or,wb),e(xe,Jb),e(xe,ct),v(ar,ct,null),e(ct,Fb),e(ct,Uo),e(Uo,Ub),e(Uo,Li),e(Li,jb),e(Uo,Bb),e(Uo,hc),e(hc,zb),e(Uo,$b),e(ct,xb),v(wn,ct,null),e(ct,Eb),v(Jn,ct,null),_(o,yu,g),_(o,jo,g),e(jo,Fn),e(Fn,mc),v(sr,mc,null),e(jo,Cb),e(jo,fc),e(fc,qb),_(o,bu,g),_(o,Ee,g),v(rr,Ee,null),e(Ee,Ib),e(Ee,gc),e(gc,Zb),e(Ee,Gb),e(Ee,ir),e(ir,Wb),e(ir,Ki),e(Ki,Nb),e(ir,Rb),e(Ee,Xb),e(Ee,dr),e(dr,Vb),e(dr,lr),e(lr,Sb),e(dr,Ab),e(Ee,Yb),e(Ee,Xe),v(cr,Xe,null),e(Xe,Qb),e(Xe,Bo),e(Bo,Ob),e(Bo,ed),e(ed,Pb),e(Bo,Db),e(Bo,_c),e(_c,Hb),e(Bo,Lb),e(Xe,Kb),v(Un,Xe,null),e(Xe,eM),v(jn,Xe,null),e(Xe,tM),v(Bn,Xe,null),_(o,Mu,g),_(o,zo,g),e(zo,zn),e(zn,yc),v(pr,yc,null),e(zo,oM),e(zo,bc),e(bc,nM),_(o,Tu,g),_(o,$o,g),v(ur,$o,null),e($o,aM),e($o,$n),v(hr,$n,null),e($n,sM),v(xn,$n,null),_(o,vu,g),_(o,xo,g),e(xo,En),e(En,Mc),v(mr,Mc,null),e(xo,rM),e(xo,Tc),e(Tc,iM),_(o,ku,g),_(o,Ce,g),v(fr,Ce,null),e(Ce,dM),e(Ce,gr),e(gr,lM),e(gr,td),e(td,cM),e(gr,pM),e(Ce,uM),e(Ce,_r),e(_r,hM),e(_r,yr),e(yr,mM),e(_r,fM),e(Ce,gM),v(Cn,Ce,null),e(Ce,_M),e(Ce,pt),v(br,pt,null),e(pt,yM),e(pt,Eo),e(Eo,bM),e(Eo,od),e(od,MM),e(Eo,TM),e(Eo,vc),e(vc,vM),e(Eo,kM),e(pt,wM),v(qn,pt,null),e(pt,JM),v(In,pt,null),_(o,wu,g),_(o,Co,g),e(Co,Zn),e(Zn,kc),v(Mr,kc,null),e(Co,FM),e(Co,wc),e(wc,UM),_(o,Ju,g),_(o,qe,g),v(Tr,qe,null),e(qe,jM),e(qe,vr),e(vr,BM),e(vr,nd),e(nd,zM),e(vr,$M),e(qe,xM),e(qe,kr),e(kr,EM),e(kr,wr),e(wr,CM),e(kr,qM),e(qe,IM),v(Gn,qe,null),e(qe,ZM),e(qe,Ve),v(Jr,Ve,null),e(Ve,GM),e(Ve,qo),e(qo,WM),e(qo,ad),e(ad,NM),e(qo,RM),e(qo,Jc),e(Jc,XM),e(qo,VM),e(Ve,SM),v(Wn,Ve,null),e(Ve,AM),v(Nn,Ve,null),e(Ve,YM),v(Rn,Ve,null),_(o,Fu,g),_(o,Io,g),e(Io,Xn),e(Xn,Fc),v(Fr,Fc,null),e(Io,QM),e(Io,Uc),e(Uc,OM),_(o,Uu,g),_(o,O,g),v(Ur,O,null),e(O,PM),e(O,jr),e(jr,DM),e(jr,sd),e(sd,HM),e(jr,LM),e(O,KM),e(O,Br),e(Br,eT),e(Br,zr),e(zr,tT),e(Br,oT),e(O,nT),e(O,jc),e(jc,aT),e(O,sT),e(O,Ct),e(Ct,Bc),e(Bc,$r),e($r,rT),e(Ct,iT),e(Ct,zc),e(zc,xr),e(xr,dT),e(Ct,lT),e(Ct,$c),e($c,Er),e(Er,cT),e(Ct,pT),e(Ct,xc),e(xc,Cr),e(Cr,uT),e(O,hT),e(O,ut),v(qr,ut,null),e(ut,mT),e(ut,Zo),e(Zo,fT),e(Zo,Ec),e(Ec,gT),e(Zo,_T),e(Zo,Cc),e(Cc,yT),e(Zo,bT),e(ut,MT),v(Vn,ut,null),e(ut,TT),v(Sn,ut,null),e(O,vT),e(O,An),v(Ir,An,null),e(An,kT),v(Yn,An,null),e(O,wT),e(O,Qn),v(Zr,Qn,null),e(Qn,JT),v(On,Qn,null),_(o,ju,g),_(o,Go,g),e(Go,Pn),e(Pn,qc),v(Gr,qc,null),e(Go,FT),e(Go,Ic),e(Ic,UT),_(o,Bu,g),_(o,P,g),v(Wr,P,null),e(P,jT),e(P,Nr),e(Nr,BT),e(Nr,rd),e(rd,zT),e(Nr,$T),e(P,xT),e(P,Rr),e(Rr,ET),e(Rr,Xr),e(Xr,CT),e(Rr,qT),e(P,IT),e(P,Zc),e(Zc,ZT),e(P,GT),e(P,qt),e(qt,Gc),e(Gc,Vr),e(Vr,WT),e(qt,NT),e(qt,Wc),e(Wc,Sr),e(Sr,RT),e(qt,XT),e(qt,Nc),e(Nc,Ar),e(Ar,VT),e(qt,ST),e(qt,Rc),e(Rc,Yr),e(Yr,AT),e(P,YT),e(P,Se),v(Qr,Se,null),e(Se,QT),e(Se,Wo),e(Wo,OT),e(Wo,Xc),e(Xc,PT),e(Wo,DT),e(Wo,Vc),e(Vc,HT),e(Wo,LT),e(Se,KT),v(Dn,Se,null),e(Se,ev),v(Hn,Se,null),e(Se,tv),v(Ln,Se,null),e(P,ov),e(P,Kn),v(Or,Kn,null),e(Kn,nv),v(ea,Kn,null),e(P,av),e(P,ta),v(Pr,ta,null),e(ta,sv),v(oa,ta,null),_(o,zu,g),_(o,No,g),e(No,na),e(na,Sc),v(Dr,Sc,null),e(No,rv),e(No,Ac),e(Ac,iv),_(o,$u,g),_(o,X,g),v(Hr,X,null),e(X,dv),e(X,Yc),e(Yc,lv),e(X,cv),e(X,Lr),e(Lr,pv),e(Lr,id),e(id,uv),e(Lr,hv),e(X,mv),e(X,Kr),e(Kr,fv),e(Kr,ei),e(ei,gv),e(Kr,_v),e(X,yv),e(X,Qc),e(Qc,bv),e(X,Mv),e(X,It),e(It,Oc),e(Oc,ti),e(ti,Tv),e(It,vv),e(It,Pc),e(Pc,oi),e(oi,kv),e(It,wv),e(It,Dc),e(Dc,ni),e(ni,Jv),e(It,Fv),e(It,Hc),e(Hc,ai),e(ai,Uv),e(X,jv),e(X,ht),v(si,ht,null),e(ht,Bv),e(ht,Ro),e(Ro,zv),e(Ro,Lc),e(Lc,$v),e(Ro,xv),e(Ro,Kc),e(Kc,Ev),e(Ro,Cv),e(ht,qv),v(aa,ht,null),e(ht,Iv),v(sa,ht,null),e(X,Zv),e(X,ra),v(ri,ra,null),e(ra,Gv),v(ia,ra,null),e(X,Wv),e(X,da),v(ii,da,null),e(da,Nv),v(la,da,null),_(o,xu,g),_(o,Xo,g),e(Xo,ca),e(ca,ep),v(di,ep,null),e(Xo,Rv),e(Xo,tp),e(tp,Xv),_(o,Eu,g),_(o,V,g),v(li,V,null),e(V,Vv),e(V,Vo),e(Vo,Sv),e(Vo,op),e(op,Av),e(Vo,Yv),e(Vo,np),e(np,Qv),e(Vo,Ov),e(V,Pv),e(V,ci),e(ci,Dv),e(ci,dd),e(dd,Hv),e(ci,Lv),e(V,Kv),e(V,pi),e(pi,ek),e(pi,ui),e(ui,tk),e(pi,ok),e(V,nk),e(V,ap),e(ap,ak),e(V,sk),e(V,Zt),e(Zt,sp),e(sp,hi),e(hi,rk),e(Zt,ik),e(Zt,rp),e(rp,mi),e(mi,dk),e(Zt,lk),e(Zt,ip),e(ip,fi),e(fi,ck),e(Zt,pk),e(Zt,dp),e(dp,gi),e(gi,uk),e(V,hk),e(V,mt),v(_i,mt,null),e(mt,mk),e(mt,So),e(So,fk),e(So,lp),e(lp,gk),e(So,_k),e(So,cp),e(cp,yk),e(So,bk),e(mt,Mk),v(pa,mt,null),e(mt,Tk),v(ua,mt,null),e(V,vk),e(V,ha),v(yi,ha,null),e(ha,kk),v(ma,ha,null),e(V,wk),e(V,fa),v(bi,fa,null),e(fa,Jk),v(ga,fa,null),Cu=!0},p(o,[g]){const Mi={};g&2&&(Mi.$$scope={dirty:g,ctx:o}),Ho.$set(Mi);const pp={};g&2&&(pp.$$scope={dirty:g,ctx:o}),Ko.$set(pp);const up={};g&2&&(up.$$scope={dirty:g,ctx:o}),tn.$set(up);const hp={};g&2&&(hp.$$scope={dirty:g,ctx:o}),rn.$set(hp);const Ti={};g&2&&(Ti.$$scope={dirty:g,ctx:o}),hn.$set(Ti);const mp={};g&2&&(mp.$$scope={dirty:g,ctx:o}),_n.$set(mp);const fp={};g&2&&(fp.$$scope={dirty:g,ctx:o}),yn.$set(fp);const _a={};g&2&&(_a.$$scope={dirty:g,ctx:o}),Mn.$set(_a);const gp={};g&2&&(gp.$$scope={dirty:g,ctx:o}),Tn.$set(gp);const _p={};g&2&&(_p.$$scope={dirty:g,ctx:o}),vn.$set(_p);const vi={};g&2&&(vi.$$scope={dirty:g,ctx:o}),wn.$set(vi);const yp={};g&2&&(yp.$$scope={dirty:g,ctx:o}),Jn.$set(yp);const bp={};g&2&&(bp.$$scope={dirty:g,ctx:o}),Un.$set(bp);const Mp={};g&2&&(Mp.$$scope={dirty:g,ctx:o}),jn.$set(Mp);const ki={};g&2&&(ki.$$scope={dirty:g,ctx:o}),Bn.$set(ki);const Tp={};g&2&&(Tp.$$scope={dirty:g,ctx:o}),xn.$set(Tp);const vp={};g&2&&(vp.$$scope={dirty:g,ctx:o}),Cn.$set(vp);const ya={};g&2&&(ya.$$scope={dirty:g,ctx:o}),qn.$set(ya);const kp={};g&2&&(kp.$$scope={dirty:g,ctx:o}),In.$set(kp);const wp={};g&2&&(wp.$$scope={dirty:g,ctx:o}),Gn.$set(wp);const wi={};g&2&&(wi.$$scope={dirty:g,ctx:o}),Wn.$set(wi);const Jp={};g&2&&(Jp.$$scope={dirty:g,ctx:o}),Nn.$set(Jp);const Fp={};g&2&&(Fp.$$scope={dirty:g,ctx:o}),Rn.$set(Fp);const Up={};g&2&&(Up.$$scope={dirty:g,ctx:o}),Vn.$set(Up);const tt={};g&2&&(tt.$$scope={dirty:g,ctx:o}),Sn.$set(tt);const jp={};g&2&&(jp.$$scope={dirty:g,ctx:o}),Yn.$set(jp);const Bp={};g&2&&(Bp.$$scope={dirty:g,ctx:o}),On.$set(Bp);const zp={};g&2&&(zp.$$scope={dirty:g,ctx:o}),Dn.$set(zp);const $p={};g&2&&($p.$$scope={dirty:g,ctx:o}),Hn.$set($p);const Gt={};g&2&&(Gt.$$scope={dirty:g,ctx:o}),Ln.$set(Gt);const ld={};g&2&&(ld.$$scope={dirty:g,ctx:o}),ea.$set(ld);const xp={};g&2&&(xp.$$scope={dirty:g,ctx:o}),oa.$set(xp);const Ep={};g&2&&(Ep.$$scope={dirty:g,ctx:o}),aa.$set(Ep);const Cp={};g&2&&(Cp.$$scope={dirty:g,ctx:o}),sa.$set(Cp);const qp={};g&2&&(qp.$$scope={dirty:g,ctx:o}),ia.$set(qp);const Ip={};g&2&&(Ip.$$scope={dirty:g,ctx:o}),la.$set(Ip);const Zp={};g&2&&(Zp.$$scope={dirty:g,ctx:o}),pa.$set(Zp);const Ji={};g&2&&(Ji.$$scope={dirty:g,ctx:o}),ua.$set(Ji);const Gp={};g&2&&(Gp.$$scope={dirty:g,ctx:o}),ma.$set(Gp);const Ao={};g&2&&(Ao.$$scope={dirty:g,ctx:o}),ga.$set(Ao)},i(o){Cu||(k(n.$$.fragment,o),k(ie.$$.fragment,o),k(W.$$.fragment,o),k(Ia.$$.fragment,o),k(Ga.$$.fragment,o),k(Wa.$$.fragment,o),k(Ra.$$.fragment,o),k(Xa.$$.fragment,o),k(Sa.$$.fragment,o),k(Aa.$$.fragment,o),k(Ya.$$.fragment,o),k(Qa.$$.fragment,o),k(Ho.$$.fragment,o),k(Pa.$$.fragment,o),k(Da.$$.fragment,o),k(Ko.$$.fragment,o),k(La.$$.fragment,o),k(ns.$$.fragment,o),k(as.$$.fragment,o),k(tn.$$.fragment,o),k(is.$$.fragment,o),k(us.$$.fragment,o),k(hs.$$.fragment,o),k(ms.$$.fragment,o),k(fs.$$.fragment,o),k(gs.$$.fragment,o),k(rn.$$.fragment,o),k(Ms.$$.fragment,o),k(Js.$$.fragment,o),k(Fs.$$.fragment,o),k(js.$$.fragment,o),k(Bs.$$.fragment,o),k(zs.$$.fragment,o),k($s.$$.fragment,o),k(hn.$$.fragment,o),k(Cs.$$.fragment,o),k(Ws.$$.fragment,o),k(Ns.$$.fragment,o),k(Rs.$$.fragment,o),k(Xs.$$.fragment,o),k(Ys.$$.fragment,o),k(_n.$$.fragment,o),k(yn.$$.fragment,o),k(Qs.$$.fragment,o),k(Os.$$.fragment,o),k(Ls.$$.fragment,o),k(Mn.$$.fragment,o),k(Tn.$$.fragment,o),k(vn.$$.fragment,o),k(Ks.$$.fragment,o),k(er.$$.fragment,o),k(ar.$$.fragment,o),k(wn.$$.fragment,o),k(Jn.$$.fragment,o),k(sr.$$.fragment,o),k(rr.$$.fragment,o),k(cr.$$.fragment,o),k(Un.$$.fragment,o),k(jn.$$.fragment,o),k(Bn.$$.fragment,o),k(pr.$$.fragment,o),k(ur.$$.fragment,o),k(hr.$$.fragment,o),k(xn.$$.fragment,o),k(mr.$$.fragment,o),k(fr.$$.fragment,o),k(Cn.$$.fragment,o),k(br.$$.fragment,o),k(qn.$$.fragment,o),k(In.$$.fragment,o),k(Mr.$$.fragment,o),k(Tr.$$.fragment,o),k(Gn.$$.fragment,o),k(Jr.$$.fragment,o),k(Wn.$$.fragment,o),k(Nn.$$.fragment,o),k(Rn.$$.fragment,o),k(Fr.$$.fragment,o),k(Ur.$$.fragment,o),k(qr.$$.fragment,o),k(Vn.$$.fragment,o),k(Sn.$$.fragment,o),k(Ir.$$.fragment,o),k(Yn.$$.fragment,o),k(Zr.$$.fragment,o),k(On.$$.fragment,o),k(Gr.$$.fragment,o),k(Wr.$$.fragment,o),k(Qr.$$.fragment,o),k(Dn.$$.fragment,o),k(Hn.$$.fragment,o),k(Ln.$$.fragment,o),k(Or.$$.fragment,o),k(ea.$$.fragment,o),k(Pr.$$.fragment,o),k(oa.$$.fragment,o),k(Dr.$$.fragment,o),k(Hr.$$.fragment,o),k(si.$$.fragment,o),k(aa.$$.fragment,o),k(sa.$$.fragment,o),k(ri.$$.fragment,o),k(ia.$$.fragment,o),k(ii.$$.fragment,o),k(la.$$.fragment,o),k(di.$$.fragment,o),k(li.$$.fragment,o),k(_i.$$.fragment,o),k(pa.$$.fragment,o),k(ua.$$.fragment,o),k(yi.$$.fragment,o),k(ma.$$.fragment,o),k(bi.$$.fragment,o),k(ga.$$.fragment,o),Cu=!0)},o(o){w(n.$$.fragment,o),w(ie.$$.fragment,o),w(W.$$.fragment,o),w(Ia.$$.fragment,o),w(Ga.$$.fragment,o),w(Wa.$$.fragment,o),w(Ra.$$.fragment,o),w(Xa.$$.fragment,o),w(Sa.$$.fragment,o),w(Aa.$$.fragment,o),w(Ya.$$.fragment,o),w(Qa.$$.fragment,o),w(Ho.$$.fragment,o),w(Pa.$$.fragment,o),w(Da.$$.fragment,o),w(Ko.$$.fragment,o),w(La.$$.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(gs.$$.fragment,o),w(rn.$$.fragment,o),w(Ms.$$.fragment,o),w(Js.$$.fragment,o),w(Fs.$$.fragment,o),w(js.$$.fragment,o),w(Bs.$$.fragment,o),w(zs.$$.fragment,o),w($s.$$.fragment,o),w(hn.$$.fragment,o),w(Cs.$$.fragment,o),w(Ws.$$.fragment,o),w(Ns.$$.fragment,o),w(Rs.$$.fragment,o),w(Xs.$$.fragment,o),w(Ys.$$.fragment,o),w(_n.$$.fragment,o),w(yn.$$.fragment,o),w(Qs.$$.fragment,o),w(Os.$$.fragment,o),w(Ls.$$.fragment,o),w(Mn.$$.fragment,o),w(Tn.$$.fragment,o),w(vn.$$.fragment,o),w(Ks.$$.fragment,o),w(er.$$.fragment,o),w(ar.$$.fragment,o),w(wn.$$.fragment,o),w(Jn.$$.fragment,o),w(sr.$$.fragment,o),w(rr.$$.fragment,o),w(cr.$$.fragment,o),w(Un.$$.fragment,o),w(jn.$$.fragment,o),w(Bn.$$.fragment,o),w(pr.$$.fragment,o),w(ur.$$.fragment,o),w(hr.$$.fragment,o),w(xn.$$.fragment,o),w(mr.$$.fragment,o),w(fr.$$.fragment,o),w(Cn.$$.fragment,o),w(br.$$.fragment,o),w(qn.$$.fragment,o),w(In.$$.fragment,o),w(Mr.$$.fragment,o),w(Tr.$$.fragment,o),w(Gn.$$.fragment,o),w(Jr.$$.fragment,o),w(Wn.$$.fragment,o),w(Nn.$$.fragment,o),w(Rn.$$.fragment,o),w(Fr.$$.fragment,o),w(Ur.$$.fragment,o),w(qr.$$.fragment,o),w(Vn.$$.fragment,o),w(Sn.$$.fragment,o),w(Ir.$$.fragment,o),w(Yn.$$.fragment,o),w(Zr.$$.fragment,o),w(On.$$.fragment,o),w(Gr.$$.fragment,o),w(Wr.$$.fragment,o),w(Qr.$$.fragment,o),w(Dn.$$.fragment,o),w(Hn.$$.fragment,o),w(Ln.$$.fragment,o),w(Or.$$.fragment,o),w(ea.$$.fragment,o),w(Pr.$$.fragment,o),w(oa.$$.fragment,o),w(Dr.$$.fragment,o),w(Hr.$$.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(_i.$$.fragment,o),w(pa.$$.fragment,o),w(ua.$$.fragment,o),w(yi.$$.fragment,o),w(ma.$$.fragment,o),w(bi.$$.fragment,o),w(ga.$$.fragment,o),Cu=!1},d(o){t(l),o&&t(b),o&&t(f),J(n),o&&t(ot),o&&t(Y),o&&t(me),o&&t(re),o&&t(nt),o&&t(Q),J(ie),o&&t(ge),o&&t(_e),o&&t(S),o&&t(Ge),o&&t(at),o&&t(de),o&&t(st),o&&t(L),J(W),o&&t($),o&&t(D),o&&t(ye),o&&t(te),o&&t(Wp),o&&t(Fi),o&&t(Np),J(Ia,o),o&&t(Rp),o&&t(Ui),o&&t(Xp),J(Ga,o),o&&t(Vp),o&&t(ro),J(Wa),o&&t(Sp),o&&t(Nt),o&&t(Ap),o&&t(ji),o&&t(Yp),o&&t(Bi),o&&t(Qp),o&&t(io),J(Ra),o&&t(Op),o&&t(rt),o&&t(Pp),o&&t(Oo),o&&t(Dp),o&&t($i),o&&t(Hp),J(Xa,o),o&&t(Lp),o&&t(xi),o&&t(Kp),J(Sa,o),o&&t(eu),o&&t(lo),J(Aa),o&&t(tu),o&&t(be),o&&t(ou),o&&t(co),J(Ya),o&&t(nu),o&&t(Le),J(Qa),J(Ho),o&&t(au),o&&t(ho),J(Pa),o&&t(su),o&&t(ue),J(Da),J(Ko),J(La),o&&t(ru),o&&t(fo),J(ns),o&&t(iu),o&&t(N),J(as),J(tn),J(is),J(us),J(hs),J(ms),o&&t(du),o&&t(yo),J(fs),o&&t(lu),o&&t(R),J(gs),J(rn),J(Ms),J(Js),J(Fs),J(js),J(Bs),o&&t(cu),o&&t(bo),J(zs),o&&t(pu),o&&t(K),J($s),J(hn),J(Cs),J(Ws),J(Ns),o&&t(uu),o&&t(To),J(Rs),o&&t(hu),o&&t(Ke),J(Xs),J(Ys),J(_n),J(yn),o&&t(mu),o&&t(ko),J(Qs),o&&t(fu),o&&t(et),J(Os),J(Ls),J(Mn),J(Tn),J(vn),o&&t(gu),o&&t(Jo),J(Ks),o&&t(_u),o&&t(xe),J(er),J(ar),J(wn),J(Jn),o&&t(yu),o&&t(jo),J(sr),o&&t(bu),o&&t(Ee),J(rr),J(cr),J(Un),J(jn),J(Bn),o&&t(Mu),o&&t(zo),J(pr),o&&t(Tu),o&&t($o),J(ur),J(hr),J(xn),o&&t(vu),o&&t(xo),J(mr),o&&t(ku),o&&t(Ce),J(fr),J(Cn),J(br),J(qn),J(In),o&&t(wu),o&&t(Co),J(Mr),o&&t(Ju),o&&t(qe),J(Tr),J(Gn),J(Jr),J(Wn),J(Nn),J(Rn),o&&t(Fu),o&&t(Io),J(Fr),o&&t(Uu),o&&t(O),J(Ur),J(qr),J(Vn),J(Sn),J(Ir),J(Yn),J(Zr),J(On),o&&t(ju),o&&t(Go),J(Gr),o&&t(Bu),o&&t(P),J(Wr),J(Qr),J(Dn),J(Hn),J(Ln),J(Or),J(ea),J(Pr),J(oa),o&&t(zu),o&&t(No),J(Dr),o&&t($u),o&&t(X),J(Hr),J(si),J(aa),J(sa),J(ri),J(ia),J(ii),J(la),o&&t(xu),o&&t(Xo),J(di),o&&t(Eu),o&&t(V),J(li),J(_i),J(pa),J(ua),J(yi),J(ma),J(bi),J(ga)}}}const BJ={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 zJ(F){return R1(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ZJ extends Z1{constructor(l){super();G1(this,l,zJ,jJ,W1,{})}}export{ZJ as default,BJ as metadata};
