import{S as R0,i as X0,s as V0,e as a,k as c,w as M,t as i,M as S0,c as s,d as t,m as p,a as r,x as T,h as l,b as m,N as N0,G as e,g as _,y as k,q as v,o as w,B as J,v as A0,L as q}from"../../chunks/vendor-hf-doc-builder.js";import{T as _t}from"../../chunks/Tip-hf-doc-builder.js";import{D as z}from"../../chunks/Docstring-hf-doc-builder.js";import{C as B}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as S}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as C}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Y0(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function Q0(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Examples:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Examples:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function P0(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Examples:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Examples:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function O0(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Examples:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Examples:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function D0(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Examples:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Examples:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function H0(F){let d,b,f,h,y;return{c(){d=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){d=s(n,"P",{});var u=r(d);b=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var j=r(f);h=l(j,"Module"),j.forEach(t),y=l(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,d,u),e(d,b),e(d,f),e(f,h),e(d,y)},d(n){n&&t(d)}}}function L0(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function K0(F){let d,b,f,h,y;return{c(){d=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){d=s(n,"P",{});var u=r(d);b=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var j=r(f);h=l(j,"Module"),j.forEach(t),y=l(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,d,u),e(d,b),e(d,f),e(f,h),e(d,y)},d(n){n&&t(d)}}}function eJ(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Translation example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Translation example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function tJ(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Mask filling example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Mask filling example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function oJ(F){let d,b,f,h,y;return{c(){d=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){d=s(n,"P",{});var u=r(d);b=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var j=r(f);h=l(j,"Module"),j.forEach(t),y=l(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,d,u),e(d,b),e(d,f),e(f,h),e(d,y)},d(n){n&&t(d)}}}function nJ(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function aJ(F){let d,b,f,h,y;return{c(){d=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){d=s(n,"P",{});var u=r(d);b=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var j=r(f);h=l(j,"Module"),j.forEach(t),y=l(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,d,u),e(d,b),e(d,f),e(f,h),e(d,y)},d(n){n&&t(d)}}}function sJ(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Example of single-label classification:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example of single-label classification:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function rJ(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Example of multi-label classification:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example of multi-label classification:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function iJ(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function lJ(F){let d,b,f,h,y,n,u,j,yt,ot,A,qe,ce,$,bt,K,Ie,Wt,pe,ae,Ye,be,Mt,Me,Te,Tt,nt,Y,ue,Qe,se,Z,G,kt,he,me,vt,D,wt,Jt,V,Ze,ke,at,re,ve,we,Ft,ie,Je,Fe,st,H,I,Pe,W,Ut,Oe;return{c(){d=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"),j=a("li"),yt=i("having all inputs as keyword arguments (like PyTorch models), or"),ot=c(),A=a("li"),qe=i("having all inputs as a list, tuple or dict in the first positional argument."),ce=c(),$=a("p"),bt=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 `),K=a("code"),Ie=i("model.fit()"),Wt=i(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),pe=a("code"),ae=i("model.fit()"),Ye=i(` supports! If, however, you want to use the second
format outside of Keras methods like `),be=a("code"),Mt=i("fit()"),Me=i(" and "),Te=a("code"),Tt=i("predict()"),nt=i(`, such as when creating your own layers or models with
the Keras `),Y=a("code"),ue=i("Functional"),Qe=i(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),se=c(),Z=a("ul"),G=a("li"),kt=i("a single Tensor with "),he=a("code"),me=i("input_ids"),vt=i(" only and nothing else: "),D=a("code"),wt=i("model(input_ids)"),Jt=c(),V=a("li"),Ze=i(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),ke=a("code"),at=i("model([input_ids, attention_mask])"),re=i(" or "),ve=a("code"),we=i("model([input_ids, attention_mask, token_type_ids])"),Ft=c(),ie=a("li"),Je=i(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Fe=a("code"),st=i('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),H=c(),I=a("p"),Pe=i(`Note that when creating models and layers with
`),W=a("a"),Ut=i("subclassing"),Oe=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){d=s(U,"P",{});var x=r(d);b=l(x,"TensorFlow models and layers in "),f=s(x,"CODE",{});var O=r(f);h=l(O,"transformers"),O.forEach(t),y=l(x," accept two formats as input:"),x.forEach(t),n=p(U),u=s(U,"UL",{});var De=r(u);j=s(De,"LI",{});var zt=r(j);yt=l(zt,"having all inputs as keyword arguments (like PyTorch models), or"),zt.forEach(t),ot=p(De),A=s(De,"LI",{});var Kt=r(A);qe=l(Kt,"having all inputs as a list, tuple or dict in the first positional argument."),Kt.forEach(t),De.forEach(t),ce=p(U),$=s(U,"P",{});var E=r($);bt=l(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 `),K=s(E,"CODE",{});var jt=r(K);Ie=l(jt,"model.fit()"),jt.forEach(t),Wt=l(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),pe=s(E,"CODE",{});var eo=r(pe);ae=l(eo,"model.fit()"),eo.forEach(t),Ye=l(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),be=s(E,"CODE",{});var to=r(be);Mt=l(to,"fit()"),to.forEach(t),Me=l(E," and "),Te=s(E,"CODE",{});var $t=r(Te);Tt=l($t,"predict()"),$t.forEach(t),nt=l(E,`, such as when creating your own layers or models with
the Keras `),Y=s(E,"CODE",{});var oo=r(Y);ue=l(oo,"Functional"),oo.forEach(t),Qe=l(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),se=p(U),Z=s(U,"UL",{});var le=r(Z);G=s(le,"LI",{});var de=r(G);kt=l(de,"a single Tensor with "),he=s(de,"CODE",{});var no=r(he);me=l(no,"input_ids"),no.forEach(t),vt=l(de," only and nothing else: "),D=s(de,"CODE",{});var ao=r(D);wt=l(ao,"model(input_ids)"),ao.forEach(t),de.forEach(t),Jt=p(le),V=s(le,"LI",{});var fe=r(V);Ze=l(fe,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),ke=s(fe,"CODE",{});var ee=r(ke);at=l(ee,"model([input_ids, attention_mask])"),ee.forEach(t),re=l(fe," or "),ve=s(fe,"CODE",{});var so=r(ve);we=l(so,"model([input_ids, attention_mask, token_type_ids])"),so.forEach(t),fe.forEach(t),Ft=p(le),ie=s(le,"LI",{});var Ue=r(ie);Je=l(Ue,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Fe=s(Ue,"CODE",{});var xt=r(Fe);st=l(xt,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),xt.forEach(t),Ue.forEach(t),le.forEach(t),H=p(U),I=s(U,"P",{});var He=r(I);Pe=l(He,`Note that when creating models and layers with
`),W=s(He,"A",{href:!0,rel:!0});var ro=r(W);Ut=l(ro,"subclassing"),ro.forEach(t),Oe=l(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,x){_(U,d,x),e(d,b),e(d,f),e(f,h),e(d,y),_(U,n,x),_(U,u,x),e(u,j),e(j,yt),e(u,ot),e(u,A),e(A,qe),_(U,ce,x),_(U,$,x),e($,bt),e($,K),e(K,Ie),e($,Wt),e($,pe),e(pe,ae),e($,Ye),e($,be),e(be,Mt),e($,Me),e($,Te),e(Te,Tt),e($,nt),e($,Y),e(Y,ue),e($,Qe),_(U,se,x),_(U,Z,x),e(Z,G),e(G,kt),e(G,he),e(he,me),e(G,vt),e(G,D),e(D,wt),e(Z,Jt),e(Z,V),e(V,Ze),e(V,ke),e(ke,at),e(V,re),e(V,ve),e(ve,we),e(Z,Ft),e(Z,ie),e(ie,Je),e(ie,Fe),e(Fe,st),_(U,H,x),_(U,I,x),e(I,Pe),e(I,W),e(W,Ut),e(I,Oe)},d(U){U&&t(d),U&&t(n),U&&t(u),U&&t(ce),U&&t($),U&&t(se),U&&t(Z),U&&t(H),U&&t(I)}}}function dJ(F){let d,b,f,h,y;return{c(){d=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){d=s(n,"P",{});var u=r(d);b=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var j=r(f);h=l(j,"Module"),j.forEach(t),y=l(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,d,u),e(d,b),e(d,f),e(f,h),e(d,y)},d(n){n&&t(d)}}}function cJ(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function pJ(F){let d,b,f,h,y,n,u,j,yt,ot,A,qe,ce,$,bt,K,Ie,Wt,pe,ae,Ye,be,Mt,Me,Te,Tt,nt,Y,ue,Qe,se,Z,G,kt,he,me,vt,D,wt,Jt,V,Ze,ke,at,re,ve,we,Ft,ie,Je,Fe,st,H,I,Pe,W,Ut,Oe;return{c(){d=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"),j=a("li"),yt=i("having all inputs as keyword arguments (like PyTorch models), or"),ot=c(),A=a("li"),qe=i("having all inputs as a list, tuple or dict in the first positional argument."),ce=c(),$=a("p"),bt=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 `),K=a("code"),Ie=i("model.fit()"),Wt=i(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),pe=a("code"),ae=i("model.fit()"),Ye=i(` supports! If, however, you want to use the second
format outside of Keras methods like `),be=a("code"),Mt=i("fit()"),Me=i(" and "),Te=a("code"),Tt=i("predict()"),nt=i(`, such as when creating your own layers or models with
the Keras `),Y=a("code"),ue=i("Functional"),Qe=i(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),se=c(),Z=a("ul"),G=a("li"),kt=i("a single Tensor with "),he=a("code"),me=i("input_ids"),vt=i(" only and nothing else: "),D=a("code"),wt=i("model(input_ids)"),Jt=c(),V=a("li"),Ze=i(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),ke=a("code"),at=i("model([input_ids, attention_mask])"),re=i(" or "),ve=a("code"),we=i("model([input_ids, attention_mask, token_type_ids])"),Ft=c(),ie=a("li"),Je=i(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Fe=a("code"),st=i('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),H=c(),I=a("p"),Pe=i(`Note that when creating models and layers with
`),W=a("a"),Ut=i("subclassing"),Oe=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){d=s(U,"P",{});var x=r(d);b=l(x,"TensorFlow models and layers in "),f=s(x,"CODE",{});var O=r(f);h=l(O,"transformers"),O.forEach(t),y=l(x," accept two formats as input:"),x.forEach(t),n=p(U),u=s(U,"UL",{});var De=r(u);j=s(De,"LI",{});var zt=r(j);yt=l(zt,"having all inputs as keyword arguments (like PyTorch models), or"),zt.forEach(t),ot=p(De),A=s(De,"LI",{});var Kt=r(A);qe=l(Kt,"having all inputs as a list, tuple or dict in the first positional argument."),Kt.forEach(t),De.forEach(t),ce=p(U),$=s(U,"P",{});var E=r($);bt=l(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 `),K=s(E,"CODE",{});var jt=r(K);Ie=l(jt,"model.fit()"),jt.forEach(t),Wt=l(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),pe=s(E,"CODE",{});var eo=r(pe);ae=l(eo,"model.fit()"),eo.forEach(t),Ye=l(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),be=s(E,"CODE",{});var to=r(be);Mt=l(to,"fit()"),to.forEach(t),Me=l(E," and "),Te=s(E,"CODE",{});var $t=r(Te);Tt=l($t,"predict()"),$t.forEach(t),nt=l(E,`, such as when creating your own layers or models with
the Keras `),Y=s(E,"CODE",{});var oo=r(Y);ue=l(oo,"Functional"),oo.forEach(t),Qe=l(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),se=p(U),Z=s(U,"UL",{});var le=r(Z);G=s(le,"LI",{});var de=r(G);kt=l(de,"a single Tensor with "),he=s(de,"CODE",{});var no=r(he);me=l(no,"input_ids"),no.forEach(t),vt=l(de," only and nothing else: "),D=s(de,"CODE",{});var ao=r(D);wt=l(ao,"model(input_ids)"),ao.forEach(t),de.forEach(t),Jt=p(le),V=s(le,"LI",{});var fe=r(V);Ze=l(fe,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),ke=s(fe,"CODE",{});var ee=r(ke);at=l(ee,"model([input_ids, attention_mask])"),ee.forEach(t),re=l(fe," or "),ve=s(fe,"CODE",{});var so=r(ve);we=l(so,"model([input_ids, attention_mask, token_type_ids])"),so.forEach(t),fe.forEach(t),Ft=p(le),ie=s(le,"LI",{});var Ue=r(ie);Je=l(Ue,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Fe=s(Ue,"CODE",{});var xt=r(Fe);st=l(xt,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),xt.forEach(t),Ue.forEach(t),le.forEach(t),H=p(U),I=s(U,"P",{});var He=r(I);Pe=l(He,`Note that when creating models and layers with
`),W=s(He,"A",{href:!0,rel:!0});var ro=r(W);Ut=l(ro,"subclassing"),ro.forEach(t),Oe=l(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,x){_(U,d,x),e(d,b),e(d,f),e(f,h),e(d,y),_(U,n,x),_(U,u,x),e(u,j),e(j,yt),e(u,ot),e(u,A),e(A,qe),_(U,ce,x),_(U,$,x),e($,bt),e($,K),e(K,Ie),e($,Wt),e($,pe),e(pe,ae),e($,Ye),e($,be),e(be,Mt),e($,Me),e($,Te),e(Te,Tt),e($,nt),e($,Y),e(Y,ue),e($,Qe),_(U,se,x),_(U,Z,x),e(Z,G),e(G,kt),e(G,he),e(he,me),e(G,vt),e(G,D),e(D,wt),e(Z,Jt),e(Z,V),e(V,Ze),e(V,ke),e(ke,at),e(V,re),e(V,ve),e(ve,we),e(Z,Ft),e(Z,ie),e(ie,Je),e(ie,Fe),e(Fe,st),_(U,H,x),_(U,I,x),e(I,Pe),e(I,W),e(W,Ut),e(I,Oe)},d(U){U&&t(d),U&&t(n),U&&t(u),U&&t(ce),U&&t($),U&&t(se),U&&t(Z),U&&t(H),U&&t(I)}}}function uJ(F){let d,b,f,h,y;return{c(){d=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){d=s(n,"P",{});var u=r(d);b=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var j=r(f);h=l(j,"Module"),j.forEach(t),y=l(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,d,u),e(d,b),e(d,f),e(f,h),e(d,y)},d(n){n&&t(d)}}}function hJ(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Translation example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Translation example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function mJ(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Mask filling example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Mask filling example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function fJ(F){let d,b,f,h,y;return{c(){d=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){d=s(n,"P",{});var u=r(d);b=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var j=r(f);h=l(j,"Module"),j.forEach(t),y=l(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,d,u),e(d,b),e(d,f),e(f,h),e(d,y)},d(n){n&&t(d)}}}function gJ(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function _J(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function yJ(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function bJ(F){let d,b,f,h,y;return{c(){d=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){d=s(n,"P",{});var u=r(d);b=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var j=r(f);h=l(j,"Module"),j.forEach(t),y=l(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,d,u),e(d,b),e(d,f),e(f,h),e(d,y)},d(n){n&&t(d)}}}function MJ(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Summarization example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Summarization example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function TJ(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Mask filling example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Mask filling example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function kJ(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function vJ(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function wJ(F){let d,b,f,h,y;return{c(){d=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){d=s(n,"P",{});var u=r(d);b=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var j=r(f);h=l(j,"Module"),j.forEach(t),y=l(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,d,u),e(d,b),e(d,f),e(f,h),e(d,y)},d(n){n&&t(d)}}}function JJ(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function FJ(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function UJ(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function zJ(F){let d,b,f,h,y;return{c(){d=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){d=s(n,"P",{});var u=r(d);b=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var j=r(f);h=l(j,"Module"),j.forEach(t),y=l(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,d,u),e(d,b),e(d,f),e(f,h),e(d,y)},d(n){n&&t(d)}}}function jJ(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function $J(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function xJ(F){let d,b,f,h,y;return h=new B({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(){d=a("p"),b=i("Example:"),f=c(),M(h.$$.fragment)},l(n){d=s(n,"P",{});var u=r(d);b=l(u,"Example:"),u.forEach(t),f=p(n),T(h.$$.fragment,n)},m(n,u){_(n,d,u),e(d,b),_(n,f,u),k(h,n,u),y=!0},p:q,i(n){y||(v(h.$$.fragment,n),y=!0)},o(n){w(h.$$.fragment,n),y=!1},d(n){n&&t(d),n&&t(f),J(h,n)}}}function BJ(F){let d,b,f,h,y,n,u,j,yt,ot,A,qe,ce,$,bt,K,Ie,Wt,pe,ae,Ye,be,Mt,Me,Te,Tt,nt,Y,ue,Qe,se,Z,G,kt,he,me,vt,D,wt,Jt,V,Ze,ke,at,re,ve,we,Ft,ie,Je,Fe,st,H,I,Pe,W,Ut,Oe,U,x,O,De,zt,Kt,E,jt,eo,to,$t,oo,le,de,no,ao,fe,ee,so,Ue,xt,He,ro,mm,$l,fm,gm,xl,_m,ym,Ap,ji,Bl,bm,Yp,Wa,Qp,$i,Na,El,Mm,Tm,io,km,Cl,vm,wm,ql,Jm,Fm,Pp,Ra,Op,lo,Yo,Il,Xa,Um,Zl,zm,Dp,Nt,jm,Va,$m,xm,Gl,Bm,Em,Hp,xi,Cm,Lp,Bi,Wl,qm,Kp,co,Qo,Nl,Sa,Im,Rl,Zm,eu,rt,Gm,Xl,Wm,Nm,Vl,Rm,Xm,Sl,Vm,Sm,tu,Po,Am,Ei,Ym,Qm,ou,Ci,Al,Pm,nu,Aa,au,qi,Ya,Yl,Om,Dm,ze,Hm,Ql,Lm,Km,Pl,ef,tf,Ol,of,nf,Dl,af,sf,Hl,rf,lf,su,Qa,ru,po,Oo,Ll,Pa,df,Kl,cf,iu,ge,ed,Ii,pf,uf,td,Zi,hf,mf,od,Gi,ff,gf,nd,Wi,_f,yf,ad,Ni,bf,Mf,sd,Ri,Tf,lu,uo,Do,rd,Oa,kf,id,vf,du,Le,Da,wf,ho,Jf,Xi,Ff,Uf,Ha,zf,jf,$f,mo,xf,Vi,Bf,Ef,Si,Cf,qf,If,Ho,cu,fo,Lo,ld,La,Zf,dd,Gf,pu,je,Ka,Wf,cd,Nf,Rf,Bt,Xf,Ai,Vf,Sf,Yi,Af,Yf,es,Qf,Pf,Of,Ko,Df,pd,Hf,Lf,ud,Kf,hd,en,eg,tn,tg,it,ts,og,os,ng,md,ag,sg,rg,ns,as,fd,ig,lg,gd,dg,cg,ss,_d,pg,ug,yd,hg,mg,bd,fg,uu,go,on,Md,rs,gg,Td,_g,hu,$e,is,yg,_o,bg,kd,Mg,Tg,ls,kg,vg,wg,ds,Jg,Qi,Fg,Ug,zg,nn,jg,vd,$g,xg,wd,Bg,Jd,Ge,Eg,an,Cg,We,cs,qg,Fd,Ig,Zg,ps,Gg,Ud,Wg,Ng,Rg,us,hs,zd,Xg,Vg,jd,Sg,Ag,ms,$d,Yg,Qg,xd,Pg,Og,Bd,Dg,Hg,sn,fs,Lg,Ed,Kg,e_,rn,gs,t_,Cd,o_,n_,ln,_s,a_,qd,s_,mu,yo,dn,Id,ys,r_,Zd,i_,fu,N,bs,l_,Ms,d_,Ts,c_,p_,u_,ks,h_,Pi,m_,f_,g_,cn,__,lt,vs,y_,ws,b_,Gd,M_,T_,k_,Js,Fs,Wd,v_,w_,Nd,J_,F_,Us,Rd,U_,z_,Xd,j_,$_,Vd,x_,B_,pn,zs,E_,Sd,C_,q_,un,js,I_,$s,Z_,Ad,G_,W_,N_,hn,xs,R_,Yd,X_,V_,mn,Bs,S_,Qd,A_,gu,bo,fn,Pd,Es,Y_,Od,Q_,_u,L,Cs,P_,Mo,O_,Dd,D_,H_,qs,L_,K_,ey,Is,ty,Oi,oy,ny,ay,gn,sy,Ne,Zs,ry,Hd,iy,ly,Gs,dy,Ld,cy,py,uy,Ws,Ns,Kd,hy,my,ec,fy,gy,Rs,tc,_y,yy,oc,by,My,nc,Ty,ky,_n,Xs,vy,ac,wy,Jy,yn,Vs,Fy,sc,Uy,yu,To,bn,rc,Ss,zy,ic,jy,bu,Ke,As,$y,Ys,xy,Di,By,Ey,Cy,Qs,qy,Ps,Iy,Zy,Gy,dt,Os,Wy,ko,Ny,Hi,Ry,Xy,lc,Vy,Sy,Ay,Mn,Yy,Tn,Mu,vo,kn,dc,Ds,Qy,cc,Py,Tu,et,Hs,Oy,Ls,Dy,Li,Hy,Ly,Ky,Ks,eb,er,tb,ob,nb,Re,tr,ab,wo,sb,Ki,rb,ib,pc,lb,db,cb,vn,pb,wn,ub,Jn,ku,Jo,Fn,uc,or,hb,hc,mb,vu,xe,nr,fb,Fo,gb,mc,_b,yb,fc,bb,Mb,Tb,ar,kb,el,vb,wb,Jb,sr,Fb,rr,Ub,zb,jb,ct,ir,$b,Uo,xb,tl,Bb,Eb,gc,Cb,qb,Ib,Un,Zb,zn,wu,zo,jn,_c,lr,Gb,yc,Wb,Ju,Be,dr,Nb,bc,Rb,Xb,cr,Vb,ol,Sb,Ab,Yb,pr,Qb,ur,Pb,Ob,Db,Xe,hr,Hb,jo,Lb,nl,Kb,eM,Mc,tM,oM,nM,$n,aM,xn,sM,Bn,Fu,$o,En,Tc,mr,rM,kc,iM,Uu,xo,fr,lM,Cn,gr,dM,qn,zu,Bo,In,vc,_r,cM,wc,pM,ju,Ee,yr,uM,br,hM,al,mM,fM,gM,Mr,_M,Tr,yM,bM,MM,Zn,TM,pt,kr,kM,Eo,vM,sl,wM,JM,Jc,FM,UM,zM,Gn,jM,Wn,$u,Co,Nn,Fc,vr,$M,Uc,xM,xu,Ce,wr,BM,Jr,EM,rl,CM,qM,IM,Fr,ZM,Ur,GM,WM,NM,Rn,RM,Ve,zr,XM,qo,VM,il,SM,AM,zc,YM,QM,PM,Xn,OM,Vn,DM,Sn,Bu,Io,An,jc,jr,HM,$c,LM,Eu,Q,$r,KM,xr,eT,ll,tT,oT,nT,Br,aT,Er,sT,rT,iT,xc,lT,dT,Et,Bc,Cr,cT,pT,Ec,qr,uT,hT,Cc,Ir,mT,fT,qc,Zr,gT,_T,ut,Gr,yT,Zo,bT,Ic,MT,TT,Zc,kT,vT,wT,Yn,JT,Qn,FT,Pn,Wr,UT,On,zT,Dn,Nr,jT,Hn,Cu,Go,Ln,Gc,Rr,$T,Wc,xT,qu,P,Xr,BT,Vr,ET,dl,CT,qT,IT,Sr,ZT,Ar,GT,WT,NT,Nc,RT,XT,Ct,Rc,Yr,VT,ST,Xc,Qr,AT,YT,Vc,Pr,QT,PT,Sc,Or,OT,DT,Se,Dr,HT,Wo,LT,Ac,KT,ek,Yc,tk,ok,nk,Kn,ak,ea,sk,ta,rk,oa,Hr,ik,na,lk,aa,Lr,dk,sa,Iu,No,ra,Qc,Kr,ck,Pc,pk,Zu,R,ei,uk,Oc,hk,mk,ti,fk,cl,gk,_k,yk,oi,bk,ni,Mk,Tk,kk,Dc,vk,wk,qt,Hc,ai,Jk,Fk,Lc,si,Uk,zk,Kc,ri,jk,$k,ep,ii,xk,Bk,ht,li,Ek,Ro,Ck,tp,qk,Ik,op,Zk,Gk,Wk,ia,Nk,la,Rk,da,di,Xk,ca,Vk,pa,ci,Sk,ua,Gu,Xo,ha,np,pi,Ak,ap,Yk,Wu,X,ui,Qk,Vo,Pk,sp,Ok,Dk,rp,Hk,Lk,Kk,hi,ev,pl,tv,ov,nv,mi,av,fi,sv,rv,iv,ip,lv,dv,It,lp,gi,cv,pv,dp,_i,uv,hv,cp,yi,mv,fv,pp,bi,gv,_v,mt,Mi,yv,So,bv,up,Mv,Tv,hp,kv,vv,wv,ma,Jv,fa,Fv,ga,Ti,Uv,_a,zv,ya,ki,jv,ba,Nu;return n=new S({}),se=new S({}),W=new S({}),Wa=new B({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)`}}),Ra=new B({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>`}}),Xa=new S({}),Sa=new S({}),Aa=new B({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>`}}),Qa=new B({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>`}}),Pa=new S({}),Oa=new S({}),Da=new z({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/main/en/model_doc/mbart#transformers.MBartModel">MBartModel</a> or <a href="/docs/transformers/main/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/main/src/transformers/models/mbart/configuration_mbart.py#L34"}}),Ho=new C({props:{anchor:"transformers.MBartConfig.example",$$slots:{default:[Y0]},$$scope:{ctx:F}}}),La=new S({}),Ka=new z({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/main/src/transformers/models/mbart/tokenization_mbart.py#L53"}}),tn=new C({props:{anchor:"transformers.MBartTokenizer.example",$$slots:{default:[Q0]},$$scope:{ctx:F}}}),ts=new z({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/main/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>
`}}),rs=new S({}),is=new z({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/main/src/transformers/models/mbart/tokenization_mbart_fast.py#L63"}}),an=new C({props:{anchor:"transformers.MBartTokenizerFast.example",$$slots:{default:[P0]},$$scope:{ctx:F}}}),cs=new z({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/main/src/transformers/models/mbart/tokenization_mbart_fast.py#L164",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>
`}}),fs=new z({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/main/src/transformers/models/mbart/tokenization_mbart_fast.py#L193",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),gs=new z({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/main/src/transformers/models/mbart/tokenization_mbart_fast.py#L248"}}),_s=new z({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/main/src/transformers/models/mbart/tokenization_mbart_fast.py#L263"}}),ys=new S({}),bs=new z({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/main/src/transformers/models/mbart50/tokenization_mbart50.py#L49"}}),cn=new C({props:{anchor:"transformers.MBart50Tokenizer.example",$$slots:{default:[O0]},$$scope:{ctx:F}}}),vs=new z({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/main/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>
`}}),zs=new z({props:{name:"convert_tokens_to_string",anchor:"transformers.MBart50Tokenizer.convert_tokens_to_string",parameters:[{name:"tokens",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart50/tokenization_mbart50.py#L235"}}),js=new z({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/main/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>
`}}),xs=new z({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/main/src/transformers/models/mbart50/tokenization_mbart50.py#L358"}}),Bs=new z({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/main/src/transformers/models/mbart50/tokenization_mbart50.py#L364"}}),Es=new S({}),Cs=new z({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/main/src/transformers/models/mbart50/tokenization_mbart50_fast.py#L59"}}),gn=new C({props:{anchor:"transformers.MBart50TokenizerFast.example",$$slots:{default:[D0]},$$scope:{ctx:F}}}),Zs=new z({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/main/src/transformers/models/mbart50/tokenization_mbart50_fast.py#L173",returnDescription:`
<p>list of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Xs=new z({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/main/src/transformers/models/mbart50/tokenization_mbart50_fast.py#L220"}}),Vs=new z({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/main/src/transformers/models/mbart50/tokenization_mbart50_fast.py#L235"}}),Ss=new S({}),As=new z({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_mbart.py#L1158"}}),Os=new z({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MBartModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.MBartModel.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>MBart uses a specific language id token as the starting token for <code>decoder_input_ids</code> generation that
varies according to source and target language, <em>e.g.</em> 25004 for <em>en_XX</em>, and 25003 for <em>de_DE</em>. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.MBartModel.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.`,name:"decoder_attention_mask"},{anchor:"transformers.MBartModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.MBartModel.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.MBartModel.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.MBartModel.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.MBartModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): Optionally, instead of passing <code>input_ids</code> you
can choose to directly pass an embedded representation. This is useful if you want more control over how to
convert <code>input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"past_key_values"},{anchor:"transformers.MBartModel.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.MBartModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.MBartModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.MBartModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.MBartModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_mbart.py#L1187",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Mn=new _t({props:{$$slots:{default:[H0]},$$scope:{ctx:F}}}),Tn=new C({props:{anchor:"transformers.MBartModel.forward.example",$$slots:{default:[L0]},$$scope:{ctx:F}}}),Ds=new S({}),Hs=new z({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_mbart.py#L1277"}}),tr=new z({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MBartForConditionalGeneration.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.MBartForConditionalGeneration.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>MBart uses a specific language id token as the starting token for <code>decoder_input_ids</code> generation that
varies according to source and target language, <em>e.g.</em> 25004 for <em>en_XX</em>, and 25003 for <em>de_DE</em>. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.MBartForConditionalGeneration.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.`,name:"decoder_attention_mask"},{anchor:"transformers.MBartForConditionalGeneration.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.MBartForConditionalGeneration.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.MBartForConditionalGeneration.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.MBartForConditionalGeneration.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.MBartForConditionalGeneration.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): Optionally, instead of passing <code>input_ids</code> you
can choose to directly pass an embedded representation. This is useful if you want more control over how to
convert <code>input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"past_key_values"},{anchor:"transformers.MBartForConditionalGeneration.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.MBartForConditionalGeneration.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.MBartForConditionalGeneration.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.MBartForConditionalGeneration.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.MBartForConditionalGeneration.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/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/main/src/transformers/models/mbart/modeling_mbart.py#L1317",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),vn=new _t({props:{$$slots:{default:[K0]},$$scope:{ctx:F}}}),wn=new C({props:{anchor:"transformers.MBartForConditionalGeneration.forward.example",$$slots:{default:[eJ]},$$scope:{ctx:F}}}),Jn=new C({props:{anchor:"transformers.MBartForConditionalGeneration.forward.example-2",$$slots:{default:[tJ]},$$scope:{ctx:F}}}),or=new S({}),nr=new z({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_mbart.py#L1576"}}),ir=new z({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MBartForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.MBartForQuestionAnswering.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>MBart uses a specific language id token as the starting token for <code>decoder_input_ids</code> generation that
varies according to source and target language, <em>e.g.</em> 25004 for <em>en_XX</em>, and 25003 for <em>de_DE</em>. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.MBartForQuestionAnswering.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.`,name:"decoder_attention_mask"},{anchor:"transformers.MBartForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.MBartForQuestionAnswering.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.MBartForQuestionAnswering.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.MBartForQuestionAnswering.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.MBartForQuestionAnswering.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): Optionally, instead of passing <code>input_ids</code> you
can choose to directly pass an embedded representation. This is useful if you want more control over how to
convert <code>input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"past_key_values"},{anchor:"transformers.MBartForQuestionAnswering.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.MBartForQuestionAnswering.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.MBartForQuestionAnswering.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.MBartForQuestionAnswering.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.MBartForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/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/main/src/transformers/models/mbart/modeling_mbart.py#L1591",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqQuestionAnsweringModelOutput"
>transformers.modeling_outputs.Seq2SeqQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Un=new _t({props:{$$slots:{default:[oJ]},$$scope:{ctx:F}}}),zn=new C({props:{anchor:"transformers.MBartForQuestionAnswering.forward.example",$$slots:{default:[nJ]},$$scope:{ctx:F}}}),lr=new S({}),dr=new z({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_mbart.py#L1447"}}),hr=new z({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MBartForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.MBartForSequenceClassification.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>MBart uses a specific language id token as the starting token for <code>decoder_input_ids</code> generation that
varies according to source and target language, <em>e.g.</em> 25004 for <em>en_XX</em>, and 25003 for <em>de_DE</em>. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.MBartForSequenceClassification.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.`,name:"decoder_attention_mask"},{anchor:"transformers.MBartForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.MBartForSequenceClassification.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.MBartForSequenceClassification.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.MBartForSequenceClassification.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.MBartForSequenceClassification.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): Optionally, instead of passing <code>input_ids</code> you
can choose to directly pass an embedded representation. This is useful if you want more control over how to
convert <code>input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"past_key_values"},{anchor:"transformers.MBartForSequenceClassification.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.MBartForSequenceClassification.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.MBartForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.MBartForSequenceClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.MBartForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/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/main/src/transformers/models/mbart/modeling_mbart.py#L1463",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqSequenceClassifierOutput"
>transformers.modeling_outputs.Seq2SeqSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$n=new _t({props:{$$slots:{default:[aJ]},$$scope:{ctx:F}}}),xn=new C({props:{anchor:"transformers.MBartForSequenceClassification.forward.example",$$slots:{default:[sJ]},$$scope:{ctx:F}}}),Bn=new C({props:{anchor:"transformers.MBartForSequenceClassification.forward.example-2",$$slots:{default:[rJ]},$$scope:{ctx:F}}}),mr=new S({}),fr=new z({props:{name:"class transformers.MBartForCausalLM",anchor:"transformers.MBartForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_mbart.py#L1709"}}),gr=new z({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MBartForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.MBartForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention
if the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.MBartForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used
in the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:`,name:"encoder_attention_mask"},{anchor:"transformers.MBartForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.MBartForCausalLM.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.MBartForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of
shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>. The two additional
tensors are only required when the model is used as a decoder in a Sequence to Sequence model.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the
cross-attention blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those
that don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of
all <code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.MBartForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"},{anchor:"transformers.MBartForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding
(see <code>past_key_values</code>).</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"use_cache"},{anchor:"transformers.MBartForCausalLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under
returned tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.MBartForCausalLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors
for more detail.`,name:"output_hidden_states"},{anchor:"transformers.MBartForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_mbart.py#L1742",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),qn=new C({props:{anchor:"transformers.MBartForCausalLM.forward.example",$$slots:{default:[iJ]},$$scope:{ctx:F}}}),_r=new S({}),yr=new z({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/main/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/main/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/main/src/transformers/models/mbart/modeling_tf_mbart.py#L1162"}}),Zn=new _t({props:{$$slots:{default:[lJ]},$$scope:{ctx:F}}}),kr=new z({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFMBartModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFMBartModel.call.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>MBart uses a specific language id token as the starting token for <code>decoder_input_ids</code> generation that
varies according to source and target language, <em>e.g.</em> 25004 for <em>en_XX</em>, and 25003 for <em>de_DE</em>. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.TFMBartModel.call.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
will be made by default and ignore pad tokens. It is not recommended to set this for most use cases.`,name:"decoder_attention_mask"},{anchor:"transformers.TFMBartModel.call.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.TFMBartModel.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFMBartModel.call.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.TFMBartModel.call.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.TFMBartModel.call.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tf.FloatTensor</code>, <em>optional</em>) &#x2014;
hidden states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.
of shape <code>(batch_size, sequence_length, hidden_size)</code> is a sequence of`,name:"encoder_outputs"},{anchor:"transformers.TFMBartModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFMBartModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"},{anchor:"transformers.TFMBartModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFMBartModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFMBartModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/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/main/src/transformers/models/mbart/modeling_tf_mbart.py#L1174",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Gn=new _t({props:{$$slots:{default:[dJ]},$$scope:{ctx:F}}}),Wn=new C({props:{anchor:"transformers.TFMBartModel.call.example",$$slots:{default:[cJ]},$$scope:{ctx:F}}}),vr=new S({}),wr=new z({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/main/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/main/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/main/src/transformers/models/mbart/modeling_tf_mbart.py#L1267"}}),Rn=new _t({props:{$$slots:{default:[pJ]},$$scope:{ctx:F}}}),zr=new z({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFMBartForConditionalGeneration.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>({0})</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFMBartForConditionalGeneration.call.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>MBart uses a specific language id token as the starting token for <code>decoder_input_ids</code> generation that
varies according to source and target language, <em>e.g.</em> 25004 for <em>en_XX</em>, and 25003 for <em>de_DE</em>. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.TFMBartForConditionalGeneration.call.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
will be made by default and ignore pad tokens. It is not recommended to set this for most use cases.`,name:"decoder_attention_mask"},{anchor:"transformers.TFMBartForConditionalGeneration.call.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.TFMBartForConditionalGeneration.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFMBartForConditionalGeneration.call.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.TFMBartForConditionalGeneration.call.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.TFMBartForConditionalGeneration.call.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tf.FloatTensor</code>, <em>optional</em>) &#x2014;
hidden states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.
of shape <code>(batch_size, sequence_length, hidden_size)</code> is a sequence of`,name:"encoder_outputs"},{anchor:"transformers.TFMBartForConditionalGeneration.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFMBartForConditionalGeneration.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"},{anchor:"transformers.TFMBartForConditionalGeneration.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFMBartForConditionalGeneration.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFMBartForConditionalGeneration.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/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/main/src/transformers/models/mbart/modeling_tf_mbart.py#L1305",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Xn=new _t({props:{$$slots:{default:[uJ]},$$scope:{ctx:F}}}),Vn=new C({props:{anchor:"transformers.TFMBartForConditionalGeneration.call.example",$$slots:{default:[hJ]},$$scope:{ctx:F}}}),Sn=new C({props:{anchor:"transformers.TFMBartForConditionalGeneration.call.example-2",$$slots:{default:[mJ]},$$scope:{ctx:F}}}),jr=new S({}),$r=new z({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/main/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/main/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/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1276"}}),Gr=new z({props:{name:"__call__",anchor:"transformers.FlaxMBartModel.__call__",parameters:[{name:"input_ids",val:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_input_ids",val:": typing.Optional[jax.Array] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"position_ids",val:": typing.Optional[jax.Array] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax.Array] = 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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxMBartModel.__call__.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.FlaxMBartModel.__call__.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.FlaxMBartModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxMBartModel.__call__.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxMBartModel.__call__.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxMBartModel.__call__.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxMBartModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1213",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Yn=new _t({props:{$$slots:{default:[fJ]},$$scope:{ctx:F}}}),Qn=new C({props:{anchor:"transformers.FlaxMBartModel.__call__.example",$$slots:{default:[gJ]},$$scope:{ctx:F}}}),Wr=new z({props:{name:"encode",anchor:"transformers.FlaxMBartModel.encode",parameters:[{name:"input_ids",val:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"position_ids",val:": typing.Optional[jax.Array] = 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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartModel.encode.attention_mask",description:`<strong>attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxMBartModel.encode.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxMBartModel.encode.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxMBartModel.encode.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxMBartModel.encode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1037",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),On=new C({props:{anchor:"transformers.FlaxMBartModel.encode.example",$$slots:{default:[_J]},$$scope:{ctx:F}}}),Nr=new z({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.Array] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax.Array] = 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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.FlaxMBartModel.decode.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(jnp.ndarray)</code>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.FlaxMBartModel.decode.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"encoder_attention_mask"},{anchor:"transformers.FlaxMBartModel.decode.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.FlaxMBartModel.decode.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxMBartModel.decode.past_key_values",description:`<strong>past_key_values</strong> (<code>Dict[str, np.ndarray]</code>, <em>optional</em>, returned by <code>init_cache</code> or when passing previous <code>past_key_values</code>) &#x2014;
Dictionary of pre-computed hidden-states (key and values in the attention blocks) that can be used for fast
auto-regressive decoding. Pre-computed key and value hidden-states are of shape <em>[batch_size, max_length]</em>.`,name:"past_key_values"},{anchor:"transformers.FlaxMBartModel.decode.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxMBartModel.decode.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxMBartModel.decode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1100",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Hn=new C({props:{anchor:"transformers.FlaxMBartModel.decode.example",$$slots:{default:[yJ]},$$scope:{ctx:F}}}),Rr=new S({}),Xr=new z({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/main/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/main/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/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1361"}}),Dr=new z({props:{name:"__call__",anchor:"transformers.FlaxMBartForConditionalGeneration.__call__",parameters:[{name:"input_ids",val:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_input_ids",val:": typing.Optional[jax.Array] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"position_ids",val:": typing.Optional[jax.Array] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax.Array] = 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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1213",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Kn=new _t({props:{$$slots:{default:[bJ]},$$scope:{ctx:F}}}),ea=new C({props:{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.example",$$slots:{default:[MJ]},$$scope:{ctx:F}}}),ta=new C({props:{anchor:"transformers.FlaxMBartForConditionalGeneration.__call__.example-2",$$slots:{default:[TJ]},$$scope:{ctx:F}}}),Hr=new z({props:{name:"encode",anchor:"transformers.FlaxMBartForConditionalGeneration.encode",parameters:[{name:"input_ids",val:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"position_ids",val:": typing.Optional[jax.Array] = 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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartForConditionalGeneration.encode.attention_mask",description:`<strong>attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxMBartForConditionalGeneration.encode.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxMBartForConditionalGeneration.encode.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxMBartForConditionalGeneration.encode.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxMBartForConditionalGeneration.encode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1037",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),na=new C({props:{anchor:"transformers.FlaxMBartForConditionalGeneration.encode.example",$$slots:{default:[kJ]},$$scope:{ctx:F}}}),Lr=new z({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.Array] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax.Array] = 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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.FlaxMBartForConditionalGeneration.decode.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(jnp.ndarray)</code>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.FlaxMBartForConditionalGeneration.decode.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"encoder_attention_mask"},{anchor:"transformers.FlaxMBartForConditionalGeneration.decode.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.FlaxMBartForConditionalGeneration.decode.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxMBartForConditionalGeneration.decode.past_key_values",description:`<strong>past_key_values</strong> (<code>Dict[str, np.ndarray]</code>, <em>optional</em>, returned by <code>init_cache</code> or when passing previous <code>past_key_values</code>) &#x2014;
Dictionary of pre-computed hidden-states (key and values in the attention blocks) that can be used for fast
auto-regressive decoding. Pre-computed key and value hidden-states are of shape <em>[batch_size, max_length]</em>.`,name:"past_key_values"},{anchor:"transformers.FlaxMBartForConditionalGeneration.decode.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxMBartForConditionalGeneration.decode.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxMBartForConditionalGeneration.decode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1365",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),sa=new C({props:{anchor:"transformers.FlaxMBartForConditionalGeneration.decode.example",$$slots:{default:[vJ]},$$scope:{ctx:F}}}),Kr=new S({}),ei=new z({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/main/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/main/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/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1674"}}),li=new z({props:{name:"__call__",anchor:"transformers.FlaxMBartForSequenceClassification.__call__",parameters:[{name:"input_ids",val:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_input_ids",val:": typing.Optional[jax.Array] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"position_ids",val:": typing.Optional[jax.Array] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax.Array] = 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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartForSequenceClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxMBartForSequenceClassification.__call__.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.FlaxMBartForSequenceClassification.__call__.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.FlaxMBartForSequenceClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxMBartForSequenceClassification.__call__.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxMBartForSequenceClassification.__call__.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxMBartForSequenceClassification.__call__.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxMBartForSequenceClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1213",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ia=new _t({props:{$$slots:{default:[wJ]},$$scope:{ctx:F}}}),la=new C({props:{anchor:"transformers.FlaxMBartForSequenceClassification.__call__.example",$$slots:{default:[JJ]},$$scope:{ctx:F}}}),di=new z({props:{name:"encode",anchor:"transformers.FlaxMBartForSequenceClassification.encode",parameters:[{name:"input_ids",val:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"position_ids",val:": typing.Optional[jax.Array] = 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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartForSequenceClassification.encode.attention_mask",description:`<strong>attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxMBartForSequenceClassification.encode.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxMBartForSequenceClassification.encode.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxMBartForSequenceClassification.encode.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxMBartForSequenceClassification.encode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1037",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ca=new C({props:{anchor:"transformers.FlaxMBartForSequenceClassification.encode.example",$$slots:{default:[FJ]},$$scope:{ctx:F}}}),ci=new z({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.Array] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax.Array] = 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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.FlaxMBartForSequenceClassification.decode.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(jnp.ndarray)</code>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.FlaxMBartForSequenceClassification.decode.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"encoder_attention_mask"},{anchor:"transformers.FlaxMBartForSequenceClassification.decode.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.FlaxMBartForSequenceClassification.decode.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxMBartForSequenceClassification.decode.past_key_values",description:`<strong>past_key_values</strong> (<code>Dict[str, np.ndarray]</code>, <em>optional</em>, returned by <code>init_cache</code> or when passing previous <code>past_key_values</code>) &#x2014;
Dictionary of pre-computed hidden-states (key and values in the attention blocks) that can be used for fast
auto-regressive decoding. Pre-computed key and value hidden-states are of shape <em>[batch_size, max_length]</em>.`,name:"past_key_values"},{anchor:"transformers.FlaxMBartForSequenceClassification.decode.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxMBartForSequenceClassification.decode.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxMBartForSequenceClassification.decode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1100",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ua=new C({props:{anchor:"transformers.FlaxMBartForSequenceClassification.decode.example",$$slots:{default:[UJ]},$$scope:{ctx:F}}}),pi=new S({}),ui=new z({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/main/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/main/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/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1761"}}),Mi=new z({props:{name:"__call__",anchor:"transformers.FlaxMBartForQuestionAnswering.__call__",parameters:[{name:"input_ids",val:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_input_ids",val:": typing.Optional[jax.Array] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"position_ids",val:": typing.Optional[jax.Array] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax.Array] = 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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartForQuestionAnswering.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxMBartForQuestionAnswering.__call__.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.FlaxMBartForQuestionAnswering.__call__.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.FlaxMBartForQuestionAnswering.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxMBartForQuestionAnswering.__call__.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxMBartForQuestionAnswering.__call__.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxMBartForQuestionAnswering.__call__.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxMBartForQuestionAnswering.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1213",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ma=new _t({props:{$$slots:{default:[zJ]},$$scope:{ctx:F}}}),fa=new C({props:{anchor:"transformers.FlaxMBartForQuestionAnswering.__call__.example",$$slots:{default:[jJ]},$$scope:{ctx:F}}}),Ti=new z({props:{name:"encode",anchor:"transformers.FlaxMBartForQuestionAnswering.encode",parameters:[{name:"input_ids",val:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"position_ids",val:": typing.Optional[jax.Array] = 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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxMBartForQuestionAnswering.encode.attention_mask",description:`<strong>attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxMBartForQuestionAnswering.encode.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxMBartForQuestionAnswering.encode.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxMBartForQuestionAnswering.encode.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxMBartForQuestionAnswering.encode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1037",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_a=new C({props:{anchor:"transformers.FlaxMBartForQuestionAnswering.encode.example",$$slots:{default:[$J]},$$scope:{ctx:F}}}),ki=new z({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.Array] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax.Array] = 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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.FlaxMBartForQuestionAnswering.decode.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(jnp.ndarray)</code>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.FlaxMBartForQuestionAnswering.decode.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"encoder_attention_mask"},{anchor:"transformers.FlaxMBartForQuestionAnswering.decode.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.FlaxMBartForQuestionAnswering.decode.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxMBartForQuestionAnswering.decode.past_key_values",description:`<strong>past_key_values</strong> (<code>Dict[str, np.ndarray]</code>, <em>optional</em>, returned by <code>init_cache</code> or when passing previous <code>past_key_values</code>) &#x2014;
Dictionary of pre-computed hidden-states (key and values in the attention blocks) that can be used for fast
auto-regressive decoding. Pre-computed key and value hidden-states are of shape <em>[batch_size, max_length]</em>.`,name:"past_key_values"},{anchor:"transformers.FlaxMBartForQuestionAnswering.decode.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxMBartForQuestionAnswering.decode.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxMBartForQuestionAnswering.decode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mbart/modeling_flax_mbart.py#L1100",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ba=new C({props:{anchor:"transformers.FlaxMBartForQuestionAnswering.decode.example",$$slots:{default:[xJ]},$$scope:{ctx:F}}}),{c(){d=a("meta"),b=c(),f=a("h1"),h=a("a"),y=a("span"),M(n.$$.fragment),u=c(),j=a("span"),yt=i("MBart and MBart-50"),ot=c(),A=a("div"),qe=a("a"),ce=a("img"),bt=c(),K=a("a"),Ie=a("img"),pe=c(),ae=a("p"),Ye=a("strong"),be=i("DISCLAIMER:"),Mt=i(" If you see something strange, file a "),Me=a("a"),Te=i("Github Issue"),Tt=i(` and assign
@patrickvonplaten`),nt=c(),Y=a("h2"),ue=a("a"),Qe=a("span"),M(se.$$.fragment),Z=c(),G=a("span"),kt=i("Overview of MBart"),he=c(),me=a("p"),vt=i("The MBart model was presented in "),D=a("a"),wt=i("Multilingual Denoising Pre-training for Neural Machine Translation"),Jt=i(` by Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov Marjan
Ghazvininejad, Mike Lewis, Luke Zettlemoyer.`),V=c(),Ze=a("p"),ke=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(),re=a("p"),ve=i("This model was contributed by "),we=a("a"),Ft=i("valhalla"),ie=i(". The Authors\u2019 code can be found "),Je=a("a"),Fe=i("here"),st=c(),H=a("h3"),I=a("a"),Pe=a("span"),M(W.$$.fragment),Ut=c(),Oe=a("span"),U=i("Training of MBart"),x=c(),O=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 `),zt=a("code"),Kt=i("X [eos, src_lang_code]"),E=i(" where "),jt=a("code"),eo=i("X"),to=i(` is the source text. The
target text format is `),$t=a("code"),oo=i("[tgt_lang_code] X [eos]"),le=i(". "),de=a("code"),no=i("bos"),ao=i(" is never used."),fe=c(),ee=a("p"),so=i("The regular "),Ue=a("a"),xt=a("strong"),He=i("call"),ro=i("()"),mm=i(" will encode source text format passed as first argument or with the "),$l=a("code"),fm=i("text"),gm=i(`
keyword, and target text format passed with the `),xl=a("code"),_m=i("text_label"),ym=i(" keyword argument."),Ap=c(),ji=a("ul"),Bl=a("li"),bm=i("Supervised training"),Yp=c(),M(Wa.$$.fragment),Qp=c(),$i=a("ul"),Na=a("li"),El=a("p"),Mm=i("Generation"),Tm=c(),io=a("p"),km=i("While generating the target text set the "),Cl=a("code"),vm=i("decoder_start_token_id"),wm=i(` to the target language id. The following
example shows how to translate English to Romanian using the `),ql=a("em"),Jm=i("facebook/mbart-large-en-ro"),Fm=i(" model."),Pp=c(),M(Ra.$$.fragment),Op=c(),lo=a("h2"),Yo=a("a"),Il=a("span"),M(Xa.$$.fragment),Um=c(),Zl=a("span"),zm=i("Overview of MBart-50"),Dp=c(),Nt=a("p"),jm=i("MBart-50 was introduced in the "),Va=a("a"),$m=i("Multilingual Translation with Extensible Multilingual Pretraining and Finetuning"),xm=i(` paper by Yuqing Tang, Chau Tran, Xian Li, Peng-Jen Chen, Naman Goyal, Vishrav
Chaudhary, Jiatao Gu, Angela Fan. MBart-50 is created using the original `),Gl=a("em"),Bm=i("mbart-large-cc25"),Em=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.`),Hp=c(),xi=a("p"),Cm=i("According to the abstract"),Lp=c(),Bi=a("p"),Wl=a("em"),qm=i(`Multilingual translation models can be created through multilingual finetuning. Instead of finetuning on one
direction, a pretrained model is finetuned on many directions at the same time. It demonstrates that pretrained models
can be extended to incorporate additional languages without loss of performance. Multilingual finetuning improves on
average 1 BLEU over the strongest baselines (being either multilingual from scratch or bilingual finetuning) while
improving 9.3 BLEU on average over bilingual baselines from scratch.`),Kp=c(),co=a("h3"),Qo=a("a"),Nl=a("span"),M(Sa.$$.fragment),Im=c(),Rl=a("span"),Zm=i("Training of MBart-50"),eu=c(),rt=a("p"),Gm=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 `),Xl=a("code"),Wm=i("[lang_code] X [eos]"),Nm=i(", where "),Vl=a("code"),Rm=i("lang_code"),Xm=i(` is source
language id for source text and target language id for target text, with `),Sl=a("code"),Vm=i("X"),Sm=i(` being the source or target text
respectively.`),tu=c(),Po=a("p"),Am=i("MBart-50 has its own tokenizer "),Ei=a("a"),Ym=i("MBart50Tokenizer"),Qm=i("."),ou=c(),Ci=a("ul"),Al=a("li"),Pm=i("Supervised training"),nu=c(),M(Aa.$$.fragment),au=c(),qi=a("ul"),Ya=a("li"),Yl=a("p"),Om=i("Generation"),Dm=c(),ze=a("p"),Hm=i("To generate using the mBART-50 multilingual translation models, "),Ql=a("code"),Lm=i("eos_token_id"),Km=i(` is used as the
`),Pl=a("code"),ef=i("decoder_start_token_id"),tf=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 `),Ol=a("em"),of=i("forced_bos_token_id"),nf=i(" parameter to the "),Dl=a("em"),af=i("generate"),sf=i(` method.
The following example shows how to translate between Hindi to French and Arabic to English using the
`),Hl=a("em"),rf=i("facebook/mbart-50-large-many-to-many"),lf=i(" checkpoint."),su=c(),M(Qa.$$.fragment),ru=c(),po=a("h2"),Oo=a("a"),Ll=a("span"),M(Pa.$$.fragment),df=c(),Kl=a("span"),cf=i("Documentation resources"),iu=c(),ge=a("ul"),ed=a("li"),Ii=a("a"),pf=i("Text classification task guide"),uf=c(),td=a("li"),Zi=a("a"),hf=i("Question answering task guide"),mf=c(),od=a("li"),Gi=a("a"),ff=i("Causal language modeling task guide"),gf=c(),nd=a("li"),Wi=a("a"),_f=i("Masked language modeling task guide"),yf=c(),ad=a("li"),Ni=a("a"),bf=i("Translation task guide"),Mf=c(),sd=a("li"),Ri=a("a"),Tf=i("Summarization task guide"),lu=c(),uo=a("h2"),Do=a("a"),rd=a("span"),M(Oa.$$.fragment),kf=c(),id=a("span"),vf=i("MBartConfig"),du=c(),Le=a("div"),M(Da.$$.fragment),wf=c(),ho=a("p"),Jf=i("This is the configuration class to store the configuration of a "),Xi=a("a"),Ff=i("MBartModel"),Uf=i(`. It is used to instantiate an MBART
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the MBART
`),Ha=a("a"),zf=i("facebook/mbart-large-cc25"),jf=i(" architecture."),$f=c(),mo=a("p"),xf=i("Configuration objects inherit from "),Vi=a("a"),Bf=i("PretrainedConfig"),Ef=i(` and can be used to control the model outputs. Read the
documentation from `),Si=a("a"),Cf=i("PretrainedConfig"),qf=i(" for more information."),If=c(),M(Ho.$$.fragment),cu=c(),fo=a("h2"),Lo=a("a"),ld=a("span"),M(La.$$.fragment),Zf=c(),dd=a("span"),Gf=i("MBartTokenizer"),pu=c(),je=a("div"),M(Ka.$$.fragment),Wf=c(),cd=a("p"),Nf=i("Construct an MBART tokenizer."),Rf=c(),Bt=a("p"),Xf=i("Adapted from "),Ai=a("a"),Vf=i("RobertaTokenizer"),Sf=i(" and "),Yi=a("a"),Af=i("XLNetTokenizer"),Yf=i(`. Based on
`),es=a("a"),Qf=i("SentencePiece"),Pf=i("."),Of=c(),Ko=a("p"),Df=i("The tokenization method is "),pd=a("code"),Hf=i("<tokens> <eos> <language code>"),Lf=i(" for source language documents, and `"),ud=a("language"),Kf=c(),hd=a("tokens"),en=a("eos"),eg=i("` for target language documents.\n"),M(tn.$$.fragment),tg=c(),it=a("div"),M(ts.$$.fragment),og=c(),os=a("p"),ng=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 `),md=a("code"),ag=i("X"),sg=i(" represents the sequence:"),rg=c(),ns=a("ul"),as=a("li"),fd=a("code"),ig=i("input_ids"),lg=i(" (for encoder) "),gd=a("code"),dg=i("X [eos, src_lang_code]"),cg=c(),ss=a("li"),_d=a("code"),pg=i("decoder_input_ids"),ug=i(": (for decoder) "),yd=a("code"),hg=i("X [eos, tgt_lang_code]"),mg=c(),bd=a("p"),fg=i(`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),uu=c(),go=a("h2"),on=a("a"),Md=a("span"),M(rs.$$.fragment),gg=c(),Td=a("span"),_g=i("MBartTokenizerFast"),hu=c(),$e=a("div"),M(is.$$.fragment),yg=c(),_o=a("p"),bg=i("Construct a \u201Cfast\u201D MBART tokenizer (backed by HuggingFace\u2019s "),kd=a("em"),Mg=i("tokenizers"),Tg=i(` library). Based on
`),ls=a("a"),kg=i("BPE"),vg=i("."),wg=c(),ds=a("p"),Jg=i("This tokenizer inherits from "),Qi=a("a"),Fg=i("PreTrainedTokenizerFast"),Ug=i(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),zg=c(),nn=a("p"),jg=i("The tokenization method is "),vd=a("code"),$g=i("<tokens> <eos> <language code>"),xg=i(" for source language documents, and `"),wd=a("language"),Bg=c(),Jd=a("tokens"),Ge=a("eos"),Eg=i("` for target language documents.\n"),M(an.$$.fragment),Cg=c(),We=a("div"),M(cs.$$.fragment),qg=c(),Fd=a("p"),Ig=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.`),Zg=c(),ps=a("p"),Gg=i("An MBART sequence has the following format, where "),Ud=a("code"),Wg=i("X"),Ng=i(" represents the sequence:"),Rg=c(),us=a("ul"),hs=a("li"),zd=a("code"),Xg=i("input_ids"),Vg=i(" (for encoder) "),jd=a("code"),Sg=i("X [eos, src_lang_code]"),Ag=c(),ms=a("li"),$d=a("code"),Yg=i("decoder_input_ids"),Qg=i(": (for decoder) "),xd=a("code"),Pg=i("X [eos, tgt_lang_code]"),Og=c(),Bd=a("p"),Dg=i(`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),Hg=c(),sn=a("div"),M(fs.$$.fragment),Lg=c(),Ed=a("p"),Kg=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.`),e_=c(),rn=a("div"),M(gs.$$.fragment),t_=c(),Cd=a("p"),o_=i("Reset the special tokens to the source lang setting. No prefix and suffix=[eos, src_lang_code]."),n_=c(),ln=a("div"),M(_s.$$.fragment),a_=c(),qd=a("p"),s_=i("Reset the special tokens to the target language setting. No prefix and suffix=[eos, tgt_lang_code]."),mu=c(),yo=a("h2"),dn=a("a"),Id=a("span"),M(ys.$$.fragment),r_=c(),Zd=a("span"),i_=i("MBart50Tokenizer"),fu=c(),N=a("div"),M(bs.$$.fragment),l_=c(),Ms=a("p"),d_=i("Construct a MBart50 tokenizer. Based on "),Ts=a("a"),c_=i("SentencePiece"),p_=i("."),u_=c(),ks=a("p"),h_=i("This tokenizer inherits from "),Pi=a("a"),m_=i("PreTrainedTokenizer"),f_=i(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),g_=c(),M(cn.$$.fragment),__=c(),lt=a("div"),M(vs.$$.fragment),y_=c(),ws=a("p"),b_=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 `),Gd=a("code"),M_=i("X"),T_=i(" represents the sequence:"),k_=c(),Js=a("ul"),Fs=a("li"),Wd=a("code"),v_=i("input_ids"),w_=i(" (for encoder) "),Nd=a("code"),J_=i("[src_lang_code] X [eos]"),F_=c(),Us=a("li"),Rd=a("code"),U_=i("labels"),z_=i(": (for decoder) "),Xd=a("code"),j_=i("[tgt_lang_code] X [eos]"),$_=c(),Vd=a("p"),x_=i(`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),B_=c(),pn=a("div"),M(zs.$$.fragment),E_=c(),Sd=a("p"),C_=i("Converts a sequence of tokens (string) in a single string."),q_=c(),un=a("div"),M(js.$$.fragment),I_=c(),$s=a("p"),Z_=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 `),Ad=a("code"),G_=i("prepare_for_model"),W_=i(" method."),N_=c(),hn=a("div"),M(xs.$$.fragment),R_=c(),Yd=a("p"),X_=i("Reset the special tokens to the source lang setting. prefix=[src_lang_code] and suffix=[eos]."),V_=c(),mn=a("div"),M(Bs.$$.fragment),S_=c(),Qd=a("p"),A_=i("Reset the special tokens to the target language setting. prefix=[tgt_lang_code] and suffix=[eos]."),gu=c(),bo=a("h2"),fn=a("a"),Pd=a("span"),M(Es.$$.fragment),Y_=c(),Od=a("span"),Q_=i("MBart50TokenizerFast"),_u=c(),L=a("div"),M(Cs.$$.fragment),P_=c(),Mo=a("p"),O_=i("Construct a \u201Cfast\u201D MBART tokenizer for mBART-50 (backed by HuggingFace\u2019s "),Dd=a("em"),D_=i("tokenizers"),H_=i(` library). Based on
`),qs=a("a"),L_=i("BPE"),K_=i("."),ey=c(),Is=a("p"),ty=i("This tokenizer inherits from "),Oi=a("a"),oy=i("PreTrainedTokenizerFast"),ny=i(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),ay=c(),M(gn.$$.fragment),sy=c(),Ne=a("div"),M(Zs.$$.fragment),ry=c(),Hd=a("p"),iy=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.`),ly=c(),Gs=a("p"),dy=i("An MBART-50 sequence has the following format, where "),Ld=a("code"),cy=i("X"),py=i(" represents the sequence:"),uy=c(),Ws=a("ul"),Ns=a("li"),Kd=a("code"),hy=i("input_ids"),my=i(" (for encoder) "),ec=a("code"),fy=i("[src_lang_code] X [eos]"),gy=c(),Rs=a("li"),tc=a("code"),_y=i("labels"),yy=i(": (for decoder) "),oc=a("code"),by=i("[tgt_lang_code] X [eos]"),My=c(),nc=a("p"),Ty=i(`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),ky=c(),_n=a("div"),M(Xs.$$.fragment),vy=c(),ac=a("p"),wy=i("Reset the special tokens to the source lang setting. prefix=[src_lang_code] and suffix=[eos]."),Jy=c(),yn=a("div"),M(Vs.$$.fragment),Fy=c(),sc=a("p"),Uy=i("Reset the special tokens to the target language setting. prefix=[src_lang_code] and suffix=[eos]."),yu=c(),To=a("h2"),bn=a("a"),rc=a("span"),M(Ss.$$.fragment),zy=c(),ic=a("span"),jy=i("MBartModel"),bu=c(),Ke=a("div"),M(As.$$.fragment),$y=c(),Ys=a("p"),xy=i(`The bare MBART Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Di=a("a"),By=i("PreTrainedModel"),Ey=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.)`),Cy=c(),Qs=a("p"),qy=i("This model is also a PyTorch "),Ps=a("a"),Iy=i("torch.nn.Module"),Zy=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Gy=c(),dt=a("div"),M(Os.$$.fragment),Wy=c(),ko=a("p"),Ny=i("The "),Hi=a("a"),Ry=i("MBartModel"),Xy=i(" forward method, overrides the "),lc=a("code"),Vy=i("__call__"),Sy=i(" special method."),Ay=c(),M(Mn.$$.fragment),Yy=c(),M(Tn.$$.fragment),Mu=c(),vo=a("h2"),kn=a("a"),dc=a("span"),M(Ds.$$.fragment),Qy=c(),cc=a("span"),Py=i("MBartForConditionalGeneration"),Tu=c(),et=a("div"),M(Hs.$$.fragment),Oy=c(),Ls=a("p"),Dy=i(`The MBART Model with a language modeling head. Can be used for summarization, after fine-tuning the pretrained models.
This model inherits from `),Li=a("a"),Hy=i("PreTrainedModel"),Ly=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.)`),Ky=c(),Ks=a("p"),eb=i("This model is also a PyTorch "),er=a("a"),tb=i("torch.nn.Module"),ob=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),nb=c(),Re=a("div"),M(tr.$$.fragment),ab=c(),wo=a("p"),sb=i("The "),Ki=a("a"),rb=i("MBartForConditionalGeneration"),ib=i(" forward method, overrides the "),pc=a("code"),lb=i("__call__"),db=i(" special method."),cb=c(),M(vn.$$.fragment),pb=c(),M(wn.$$.fragment),ub=c(),M(Jn.$$.fragment),ku=c(),Jo=a("h2"),Fn=a("a"),uc=a("span"),M(or.$$.fragment),hb=c(),hc=a("span"),mb=i("MBartForQuestionAnswering"),vu=c(),xe=a("div"),M(nr.$$.fragment),fb=c(),Fo=a("p"),gb=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 `),mc=a("code"),_b=i("span start logits"),yb=i(" and "),fc=a("code"),bb=i("span end logits"),Mb=i(")."),Tb=c(),ar=a("p"),kb=i("This model inherits from "),el=a("a"),vb=i("PreTrainedModel"),wb=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.)`),Jb=c(),sr=a("p"),Fb=i("This model is also a PyTorch "),rr=a("a"),Ub=i("torch.nn.Module"),zb=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(ir.$$.fragment),$b=c(),Uo=a("p"),xb=i("The "),tl=a("a"),Bb=i("MBartForQuestionAnswering"),Eb=i(" forward method, overrides the "),gc=a("code"),Cb=i("__call__"),qb=i(" special method."),Ib=c(),M(Un.$$.fragment),Zb=c(),M(zn.$$.fragment),wu=c(),zo=a("h2"),jn=a("a"),_c=a("span"),M(lr.$$.fragment),Gb=c(),yc=a("span"),Wb=i("MBartForSequenceClassification"),Ju=c(),Be=a("div"),M(dr.$$.fragment),Nb=c(),bc=a("p"),Rb=i(`MBart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),Xb=c(),cr=a("p"),Vb=i("This model inherits from "),ol=a("a"),Sb=i("PreTrainedModel"),Ab=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Yb=c(),pr=a("p"),Qb=i("This model is also a PyTorch "),ur=a("a"),Pb=i("torch.nn.Module"),Ob=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Db=c(),Xe=a("div"),M(hr.$$.fragment),Hb=c(),jo=a("p"),Lb=i("The "),nl=a("a"),Kb=i("MBartForSequenceClassification"),eM=i(" forward method, overrides the "),Mc=a("code"),tM=i("__call__"),oM=i(" special method."),nM=c(),M($n.$$.fragment),aM=c(),M(xn.$$.fragment),sM=c(),M(Bn.$$.fragment),Fu=c(),$o=a("h2"),En=a("a"),Tc=a("span"),M(mr.$$.fragment),rM=c(),kc=a("span"),iM=i("MBartForCausalLM"),Uu=c(),xo=a("div"),M(fr.$$.fragment),lM=c(),Cn=a("div"),M(gr.$$.fragment),dM=c(),M(qn.$$.fragment),zu=c(),Bo=a("h2"),In=a("a"),vc=a("span"),M(_r.$$.fragment),cM=c(),wc=a("span"),pM=i("TFMBartModel"),ju=c(),Ee=a("div"),M(yr.$$.fragment),uM=c(),br=a("p"),hM=i(`The bare MBART Model outputting raw hidden-states without any specific head on top.
This model inherits from `),al=a("a"),mM=i("TFPreTrainedModel"),fM=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.)`),gM=c(),Mr=a("p"),_M=i("This model is also a "),Tr=a("a"),yM=i("tf.keras.Model"),bM=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.`),MM=c(),M(Zn.$$.fragment),TM=c(),pt=a("div"),M(kr.$$.fragment),kM=c(),Eo=a("p"),vM=i("The "),sl=a("a"),wM=i("TFMBartModel"),JM=i(" forward method, overrides the "),Jc=a("code"),FM=i("__call__"),UM=i(" special method."),zM=c(),M(Gn.$$.fragment),jM=c(),M(Wn.$$.fragment),$u=c(),Co=a("h2"),Nn=a("a"),Fc=a("span"),M(vr.$$.fragment),$M=c(),Uc=a("span"),xM=i("TFMBartForConditionalGeneration"),xu=c(),Ce=a("div"),M(wr.$$.fragment),BM=c(),Jr=a("p"),EM=i(`The MBART Model with a language modeling head. Can be used for summarization, after fine-tuning the pretrained models.
This model inherits from `),rl=a("a"),CM=i("TFPreTrainedModel"),qM=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.)`),IM=c(),Fr=a("p"),ZM=i("This model is also a "),Ur=a("a"),GM=i("tf.keras.Model"),WM=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.`),NM=c(),M(Rn.$$.fragment),RM=c(),Ve=a("div"),M(zr.$$.fragment),XM=c(),qo=a("p"),VM=i("The "),il=a("a"),SM=i("TFMBartForConditionalGeneration"),AM=i(" forward method, overrides the "),zc=a("code"),YM=i("__call__"),QM=i(" special method."),PM=c(),M(Xn.$$.fragment),OM=c(),M(Vn.$$.fragment),DM=c(),M(Sn.$$.fragment),Bu=c(),Io=a("h2"),An=a("a"),jc=a("span"),M(jr.$$.fragment),HM=c(),$c=a("span"),LM=i("FlaxMBartModel"),Eu=c(),Q=a("div"),M($r.$$.fragment),KM=c(),xr=a("p"),eT=i(`The bare MBart Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),ll=a("a"),tT=i("FlaxPreTrainedModel"),oT=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.)`),nT=c(),Br=a("p"),aT=i(`This model is also a Flax Linen
`),Er=a("a"),sT=i("flax.nn.Module"),rT=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(),xc=a("p"),lT=i("Finally, this model supports inherent JAX features such as:"),dT=c(),Et=a("ul"),Bc=a("li"),Cr=a("a"),cT=i("Just-In-Time (JIT) compilation"),pT=c(),Ec=a("li"),qr=a("a"),uT=i("Automatic Differentiation"),hT=c(),Cc=a("li"),Ir=a("a"),mT=i("Vectorization"),fT=c(),qc=a("li"),Zr=a("a"),gT=i("Parallelization"),_T=c(),ut=a("div"),M(Gr.$$.fragment),yT=c(),Zo=a("p"),bT=i("The "),Ic=a("code"),MT=i("FlaxMBartPreTrainedModel"),TT=i(" forward method, overrides the "),Zc=a("code"),kT=i("__call__"),vT=i(" special method."),wT=c(),M(Yn.$$.fragment),JT=c(),M(Qn.$$.fragment),FT=c(),Pn=a("div"),M(Wr.$$.fragment),UT=c(),M(On.$$.fragment),zT=c(),Dn=a("div"),M(Nr.$$.fragment),jT=c(),M(Hn.$$.fragment),Cu=c(),Go=a("h2"),Ln=a("a"),Gc=a("span"),M(Rr.$$.fragment),$T=c(),Wc=a("span"),xT=i("FlaxMBartForConditionalGeneration"),qu=c(),P=a("div"),M(Xr.$$.fragment),BT=c(),Vr=a("p"),ET=i(`The MMBart Model with a language modeling head. Can be used for summarization.
This model inherits from `),dl=a("a"),CT=i("FlaxPreTrainedModel"),qT=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.)`),IT=c(),Sr=a("p"),ZT=i(`This model is also a Flax Linen
`),Ar=a("a"),GT=i("flax.nn.Module"),WT=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(),Nc=a("p"),RT=i("Finally, this model supports inherent JAX features such as:"),XT=c(),Ct=a("ul"),Rc=a("li"),Yr=a("a"),VT=i("Just-In-Time (JIT) compilation"),ST=c(),Xc=a("li"),Qr=a("a"),AT=i("Automatic Differentiation"),YT=c(),Vc=a("li"),Pr=a("a"),QT=i("Vectorization"),PT=c(),Sc=a("li"),Or=a("a"),OT=i("Parallelization"),DT=c(),Se=a("div"),M(Dr.$$.fragment),HT=c(),Wo=a("p"),LT=i("The "),Ac=a("code"),KT=i("FlaxMBartPreTrainedModel"),ek=i(" forward method, overrides the "),Yc=a("code"),tk=i("__call__"),ok=i(" special method."),nk=c(),M(Kn.$$.fragment),ak=c(),M(ea.$$.fragment),sk=c(),M(ta.$$.fragment),rk=c(),oa=a("div"),M(Hr.$$.fragment),ik=c(),M(na.$$.fragment),lk=c(),aa=a("div"),M(Lr.$$.fragment),dk=c(),M(sa.$$.fragment),Iu=c(),No=a("h2"),ra=a("a"),Qc=a("span"),M(Kr.$$.fragment),ck=c(),Pc=a("span"),pk=i("FlaxMBartForSequenceClassification"),Zu=c(),R=a("div"),M(ei.$$.fragment),uk=c(),Oc=a("p"),hk=i(`MBart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),mk=c(),ti=a("p"),fk=i("This model inherits from "),cl=a("a"),gk=i("FlaxPreTrainedModel"),_k=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.)`),yk=c(),oi=a("p"),bk=i(`This model is also a Flax Linen
`),ni=a("a"),Mk=i("flax.nn.Module"),Tk=i(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),kk=c(),Dc=a("p"),vk=i("Finally, this model supports inherent JAX features such as:"),wk=c(),qt=a("ul"),Hc=a("li"),ai=a("a"),Jk=i("Just-In-Time (JIT) compilation"),Fk=c(),Lc=a("li"),si=a("a"),Uk=i("Automatic Differentiation"),zk=c(),Kc=a("li"),ri=a("a"),jk=i("Vectorization"),$k=c(),ep=a("li"),ii=a("a"),xk=i("Parallelization"),Bk=c(),ht=a("div"),M(li.$$.fragment),Ek=c(),Ro=a("p"),Ck=i("The "),tp=a("code"),qk=i("FlaxMBartPreTrainedModel"),Ik=i(" forward method, overrides the "),op=a("code"),Zk=i("__call__"),Gk=i(" special method."),Wk=c(),M(ia.$$.fragment),Nk=c(),M(la.$$.fragment),Rk=c(),da=a("div"),M(di.$$.fragment),Xk=c(),M(ca.$$.fragment),Vk=c(),pa=a("div"),M(ci.$$.fragment),Sk=c(),M(ua.$$.fragment),Gu=c(),Xo=a("h2"),ha=a("a"),np=a("span"),M(pi.$$.fragment),Ak=c(),ap=a("span"),Yk=i("FlaxMBartForQuestionAnswering"),Wu=c(),X=a("div"),M(ui.$$.fragment),Qk=c(),Vo=a("p"),Pk=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 `),sp=a("code"),Ok=i("span start logits"),Dk=i(" and "),rp=a("code"),Hk=i("span end logits"),Lk=i(")."),Kk=c(),hi=a("p"),ev=i("This model inherits from "),pl=a("a"),tv=i("FlaxPreTrainedModel"),ov=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.)`),nv=c(),mi=a("p"),av=i(`This model is also a Flax Linen
`),fi=a("a"),sv=i("flax.nn.Module"),rv=i(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),iv=c(),ip=a("p"),lv=i("Finally, this model supports inherent JAX features such as:"),dv=c(),It=a("ul"),lp=a("li"),gi=a("a"),cv=i("Just-In-Time (JIT) compilation"),pv=c(),dp=a("li"),_i=a("a"),uv=i("Automatic Differentiation"),hv=c(),cp=a("li"),yi=a("a"),mv=i("Vectorization"),fv=c(),pp=a("li"),bi=a("a"),gv=i("Parallelization"),_v=c(),mt=a("div"),M(Mi.$$.fragment),yv=c(),So=a("p"),bv=i("The "),up=a("code"),Mv=i("FlaxMBartPreTrainedModel"),Tv=i(" forward method, overrides the "),hp=a("code"),kv=i("__call__"),vv=i(" special method."),wv=c(),M(ma.$$.fragment),Jv=c(),M(fa.$$.fragment),Fv=c(),ga=a("div"),M(Ti.$$.fragment),Uv=c(),M(_a.$$.fragment),zv=c(),ya=a("div"),M(ki.$$.fragment),jv=c(),M(ba.$$.fragment),this.h()},l(o){const g=S0('[data-svelte="svelte-1phssyn"]',document.head);d=s(g,"META",{name:!0,content:!0}),g.forEach(t),b=p(o),f=s(o,"H1",{class:!0});var vi=r(f);h=s(vi,"A",{id:!0,class:!0,href:!0});var mp=r(h);y=s(mp,"SPAN",{});var fp=r(y);T(n.$$.fragment,fp),fp.forEach(t),mp.forEach(t),u=p(vi),j=s(vi,"SPAN",{});var gp=r(j);yt=l(gp,"MBart and MBart-50"),gp.forEach(t),vi.forEach(t),ot=p(o),A=s(o,"DIV",{class:!0});var wi=r(A);qe=s(wi,"A",{href:!0});var _p=r(qe);ce=s(_p,"IMG",{alt:!0,src:!0}),_p.forEach(t),bt=p(wi),K=s(wi,"A",{href:!0});var yp=r(K);Ie=s(yp,"IMG",{alt:!0,src:!0}),yp.forEach(t),wi.forEach(t),pe=p(o),ae=s(o,"P",{});var Ma=r(ae);Ye=s(Ma,"STRONG",{});var bp=r(Ye);be=l(bp,"DISCLAIMER:"),bp.forEach(t),Mt=l(Ma," If you see something strange, file a "),Me=s(Ma,"A",{href:!0,rel:!0});var Mp=r(Me);Te=l(Mp,"Github Issue"),Mp.forEach(t),Tt=l(Ma,` and assign
@patrickvonplaten`),Ma.forEach(t),nt=p(o),Y=s(o,"H2",{class:!0});var Ji=r(Y);ue=s(Ji,"A",{id:!0,class:!0,href:!0});var Tp=r(ue);Qe=s(Tp,"SPAN",{});var kp=r(Qe);T(se.$$.fragment,kp),kp.forEach(t),Tp.forEach(t),Z=p(Ji),G=s(Ji,"SPAN",{});var vp=r(G);kt=l(vp,"Overview of MBart"),vp.forEach(t),Ji.forEach(t),he=p(o),me=s(o,"P",{});var Fi=r(me);vt=l(Fi,"The MBart model was presented in "),D=s(Fi,"A",{href:!0,rel:!0});var wp=r(D);wt=l(wp,"Multilingual Denoising Pre-training for Neural Machine Translation"),wp.forEach(t),Jt=l(Fi,` by Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov Marjan
Ghazvininejad, Mike Lewis, Luke Zettlemoyer.`),Fi.forEach(t),V=p(o),Ze=s(o,"P",{});var Jp=r(Ze);ke=l(Jp,`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.`),Jp.forEach(t),at=p(o),re=s(o,"P",{});var Ta=r(re);ve=l(Ta,"This model was contributed by "),we=s(Ta,"A",{href:!0,rel:!0});var Fp=r(we);Ft=l(Fp,"valhalla"),Fp.forEach(t),ie=l(Ta,". The Authors\u2019 code can be found "),Je=s(Ta,"A",{href:!0,rel:!0});var Up=r(Je);Fe=l(Up,"here"),Up.forEach(t),Ta.forEach(t),st=p(o),H=s(o,"H3",{class:!0});var Ui=r(H);I=s(Ui,"A",{id:!0,class:!0,href:!0});var zp=r(I);Pe=s(zp,"SPAN",{});var jp=r(Pe);T(W.$$.fragment,jp),jp.forEach(t),zp.forEach(t),Ut=p(Ui),Oe=s(Ui,"SPAN",{});var $p=r(Oe);U=l($p,"Training of MBart"),$p.forEach(t),Ui.forEach(t),x=p(o),O=s(o,"P",{});var tt=r(O);De=l(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 `),zt=s(tt,"CODE",{});var xp=r(zt);Kt=l(xp,"X [eos, src_lang_code]"),xp.forEach(t),E=l(tt," where "),jt=s(tt,"CODE",{});var Bp=r(jt);eo=l(Bp,"X"),Bp.forEach(t),to=l(tt,` is the source text. The
target text format is `),$t=s(tt,"CODE",{});var Ep=r($t);oo=l(Ep,"[tgt_lang_code] X [eos]"),Ep.forEach(t),le=l(tt,". "),de=s(tt,"CODE",{});var Cp=r(de);no=l(Cp,"bos"),Cp.forEach(t),ao=l(tt," is never used."),tt.forEach(t),fe=p(o),ee=s(o,"P",{});var Zt=r(ee);so=l(Zt,"The regular "),Ue=s(Zt,"A",{href:!0});var ul=r(Ue);xt=s(ul,"STRONG",{});var qp=r(xt);He=l(qp,"call"),qp.forEach(t),ro=l(ul,"()"),ul.forEach(t),mm=l(Zt," will encode source text format passed as first argument or with the "),$l=s(Zt,"CODE",{});var Ip=r($l);fm=l(Ip,"text"),Ip.forEach(t),gm=l(Zt,`
keyword, and target text format passed with the `),xl=s(Zt,"CODE",{});var Zp=r(xl);_m=l(Zp,"text_label"),Zp.forEach(t),ym=l(Zt," keyword argument."),Zt.forEach(t),Ap=p(o),ji=s(o,"UL",{});var Gp=r(ji);Bl=s(Gp,"LI",{});var Wp=r(Bl);bm=l(Wp,"Supervised training"),Wp.forEach(t),Gp.forEach(t),Yp=p(o),T(Wa.$$.fragment,o),Qp=p(o),$i=s(o,"UL",{});var Np=r($i);Na=s(Np,"LI",{});var zi=r(Na);El=s(zi,"P",{});var Rp=r(El);Mm=l(Rp,"Generation"),Rp.forEach(t),Tm=p(zi),io=s(zi,"P",{});var Ao=r(io);km=l(Ao,"While generating the target text set the "),Cl=s(Ao,"CODE",{});var $v=r(Cl);vm=l($v,"decoder_start_token_id"),$v.forEach(t),wm=l(Ao,` to the target language id. The following
example shows how to translate English to Romanian using the `),ql=s(Ao,"EM",{});var xv=r(ql);Jm=l(xv,"facebook/mbart-large-en-ro"),xv.forEach(t),Fm=l(Ao," model."),Ao.forEach(t),zi.forEach(t),Np.forEach(t),Pp=p(o),T(Ra.$$.fragment,o),Op=p(o),lo=s(o,"H2",{class:!0});var Ru=r(lo);Yo=s(Ru,"A",{id:!0,class:!0,href:!0});var Bv=r(Yo);Il=s(Bv,"SPAN",{});var Ev=r(Il);T(Xa.$$.fragment,Ev),Ev.forEach(t),Bv.forEach(t),Um=p(Ru),Zl=s(Ru,"SPAN",{});var Cv=r(Zl);zm=l(Cv,"Overview of MBart-50"),Cv.forEach(t),Ru.forEach(t),Dp=p(o),Nt=s(o,"P",{});var hl=r(Nt);jm=l(hl,"MBart-50 was introduced in the "),Va=s(hl,"A",{href:!0,rel:!0});var qv=r(Va);$m=l(qv,"Multilingual Translation with Extensible Multilingual Pretraining and Finetuning"),qv.forEach(t),xm=l(hl,` 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 `),Gl=s(hl,"EM",{});var Iv=r(Gl);Bm=l(Iv,"mbart-large-cc25"),Iv.forEach(t),Em=l(hl,` checkpoint by extendeding
its embedding layers with randomly initialized vectors for an extra set of 25 language tokens and then pretrained on 50
languages.`),hl.forEach(t),Hp=p(o),xi=s(o,"P",{});var Zv=r(xi);Cm=l(Zv,"According to the abstract"),Zv.forEach(t),Lp=p(o),Bi=s(o,"P",{});var Gv=r(Bi);Wl=s(Gv,"EM",{});var Wv=r(Wl);qm=l(Wv,`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.`),Wv.forEach(t),Gv.forEach(t),Kp=p(o),co=s(o,"H3",{class:!0});var Xu=r(co);Qo=s(Xu,"A",{id:!0,class:!0,href:!0});var Nv=r(Qo);Nl=s(Nv,"SPAN",{});var Rv=r(Nl);T(Sa.$$.fragment,Rv),Rv.forEach(t),Nv.forEach(t),Im=p(Xu),Rl=s(Xu,"SPAN",{});var Xv=r(Rl);Zm=l(Xv,"Training of MBart-50"),Xv.forEach(t),Xu.forEach(t),eu=p(o),rt=s(o,"P",{});var ka=r(rt);Gm=l(ka,`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 `),Xl=s(ka,"CODE",{});var Vv=r(Xl);Wm=l(Vv,"[lang_code] X [eos]"),Vv.forEach(t),Nm=l(ka,", where "),Vl=s(ka,"CODE",{});var Sv=r(Vl);Rm=l(Sv,"lang_code"),Sv.forEach(t),Xm=l(ka,` is source
language id for source text and target language id for target text, with `),Sl=s(ka,"CODE",{});var Av=r(Sl);Vm=l(Av,"X"),Av.forEach(t),Sm=l(ka,` being the source or target text
respectively.`),ka.forEach(t),tu=p(o),Po=s(o,"P",{});var Vu=r(Po);Am=l(Vu,"MBart-50 has its own tokenizer "),Ei=s(Vu,"A",{href:!0});var Yv=r(Ei);Ym=l(Yv,"MBart50Tokenizer"),Yv.forEach(t),Qm=l(Vu,"."),Vu.forEach(t),ou=p(o),Ci=s(o,"UL",{});var Qv=r(Ci);Al=s(Qv,"LI",{});var Pv=r(Al);Pm=l(Pv,"Supervised training"),Pv.forEach(t),Qv.forEach(t),nu=p(o),T(Aa.$$.fragment,o),au=p(o),qi=s(o,"UL",{});var Ov=r(qi);Ya=s(Ov,"LI",{});var Su=r(Ya);Yl=s(Su,"P",{});var Dv=r(Yl);Om=l(Dv,"Generation"),Dv.forEach(t),Dm=p(Su),ze=s(Su,"P",{});var ft=r(ze);Hm=l(ft,"To generate using the mBART-50 multilingual translation models, "),Ql=s(ft,"CODE",{});var Hv=r(Ql);Lm=l(Hv,"eos_token_id"),Hv.forEach(t),Km=l(ft,` is used as the
`),Pl=s(ft,"CODE",{});var Lv=r(Pl);ef=l(Lv,"decoder_start_token_id"),Lv.forEach(t),tf=l(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 `),Ol=s(ft,"EM",{});var Kv=r(Ol);of=l(Kv,"forced_bos_token_id"),Kv.forEach(t),nf=l(ft," parameter to the "),Dl=s(ft,"EM",{});var ew=r(Dl);af=l(ew,"generate"),ew.forEach(t),sf=l(ft,` method.
The following example shows how to translate between Hindi to French and Arabic to English using the
`),Hl=s(ft,"EM",{});var tw=r(Hl);rf=l(tw,"facebook/mbart-50-large-many-to-many"),tw.forEach(t),lf=l(ft," checkpoint."),ft.forEach(t),Su.forEach(t),Ov.forEach(t),su=p(o),T(Qa.$$.fragment,o),ru=p(o),po=s(o,"H2",{class:!0});var Au=r(po);Oo=s(Au,"A",{id:!0,class:!0,href:!0});var ow=r(Oo);Ll=s(ow,"SPAN",{});var nw=r(Ll);T(Pa.$$.fragment,nw),nw.forEach(t),ow.forEach(t),df=p(Au),Kl=s(Au,"SPAN",{});var aw=r(Kl);cf=l(aw,"Documentation resources"),aw.forEach(t),Au.forEach(t),iu=p(o),ge=s(o,"UL",{});var gt=r(ge);ed=s(gt,"LI",{});var sw=r(ed);Ii=s(sw,"A",{href:!0});var rw=r(Ii);pf=l(rw,"Text classification task guide"),rw.forEach(t),sw.forEach(t),uf=p(gt),td=s(gt,"LI",{});var iw=r(td);Zi=s(iw,"A",{href:!0});var lw=r(Zi);hf=l(lw,"Question answering task guide"),lw.forEach(t),iw.forEach(t),mf=p(gt),od=s(gt,"LI",{});var dw=r(od);Gi=s(dw,"A",{href:!0});var cw=r(Gi);ff=l(cw,"Causal language modeling task guide"),cw.forEach(t),dw.forEach(t),gf=p(gt),nd=s(gt,"LI",{});var pw=r(nd);Wi=s(pw,"A",{href:!0});var uw=r(Wi);_f=l(uw,"Masked language modeling task guide"),uw.forEach(t),pw.forEach(t),yf=p(gt),ad=s(gt,"LI",{});var hw=r(ad);Ni=s(hw,"A",{href:!0});var mw=r(Ni);bf=l(mw,"Translation task guide"),mw.forEach(t),hw.forEach(t),Mf=p(gt),sd=s(gt,"LI",{});var fw=r(sd);Ri=s(fw,"A",{href:!0});var gw=r(Ri);Tf=l(gw,"Summarization task guide"),gw.forEach(t),fw.forEach(t),gt.forEach(t),lu=p(o),uo=s(o,"H2",{class:!0});var Yu=r(uo);Do=s(Yu,"A",{id:!0,class:!0,href:!0});var _w=r(Do);rd=s(_w,"SPAN",{});var yw=r(rd);T(Oa.$$.fragment,yw),yw.forEach(t),_w.forEach(t),kf=p(Yu),id=s(Yu,"SPAN",{});var bw=r(id);vf=l(bw,"MBartConfig"),bw.forEach(t),Yu.forEach(t),du=p(o),Le=s(o,"DIV",{class:!0});var va=r(Le);T(Da.$$.fragment,va),wf=p(va),ho=s(va,"P",{});var ml=r(ho);Jf=l(ml,"This is the configuration class to store the configuration of a "),Xi=s(ml,"A",{href:!0});var Mw=r(Xi);Ff=l(Mw,"MBartModel"),Mw.forEach(t),Uf=l(ml,`. It is used to instantiate an MBART
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the MBART
`),Ha=s(ml,"A",{href:!0,rel:!0});var Tw=r(Ha);zf=l(Tw,"facebook/mbart-large-cc25"),Tw.forEach(t),jf=l(ml," architecture."),ml.forEach(t),$f=p(va),mo=s(va,"P",{});var fl=r(mo);xf=l(fl,"Configuration objects inherit from "),Vi=s(fl,"A",{href:!0});var kw=r(Vi);Bf=l(kw,"PretrainedConfig"),kw.forEach(t),Ef=l(fl,` and can be used to control the model outputs. Read the
documentation from `),Si=s(fl,"A",{href:!0});var vw=r(Si);Cf=l(vw,"PretrainedConfig"),vw.forEach(t),qf=l(fl," for more information."),fl.forEach(t),If=p(va),T(Ho.$$.fragment,va),va.forEach(t),cu=p(o),fo=s(o,"H2",{class:!0});var Qu=r(fo);Lo=s(Qu,"A",{id:!0,class:!0,href:!0});var ww=r(Lo);ld=s(ww,"SPAN",{});var Jw=r(ld);T(La.$$.fragment,Jw),Jw.forEach(t),ww.forEach(t),Zf=p(Qu),dd=s(Qu,"SPAN",{});var Fw=r(dd);Gf=l(Fw,"MBartTokenizer"),Fw.forEach(t),Qu.forEach(t),pu=p(o),je=s(o,"DIV",{class:!0});var Rt=r(je);T(Ka.$$.fragment,Rt),Wf=p(Rt),cd=s(Rt,"P",{});var Uw=r(cd);Nf=l(Uw,"Construct an MBART tokenizer."),Uw.forEach(t),Rf=p(Rt),Bt=s(Rt,"P",{});var wa=r(Bt);Xf=l(wa,"Adapted from "),Ai=s(wa,"A",{href:!0});var zw=r(Ai);Vf=l(zw,"RobertaTokenizer"),zw.forEach(t),Sf=l(wa," and "),Yi=s(wa,"A",{href:!0});var jw=r(Yi);Af=l(jw,"XLNetTokenizer"),jw.forEach(t),Yf=l(wa,`. Based on
`),es=s(wa,"A",{href:!0,rel:!0});var $w=r(es);Qf=l($w,"SentencePiece"),$w.forEach(t),Pf=l(wa,"."),wa.forEach(t),Of=p(Rt),Ko=s(Rt,"P",{});var Xp=r(Ko);Df=l(Xp,"The tokenization method is "),pd=s(Xp,"CODE",{});var xw=r(pd);Hf=l(xw,"<tokens> <eos> <language code>"),xw.forEach(t),Lf=l(Xp," for source language documents, and `"),ud=s(Xp,"LANGUAGE",{code:!0}),r(ud).forEach(t),Xp.forEach(t),Kf=p(Rt),hd=s(Rt,"TOKENS",{});var Bw=r(hd);en=s(Bw,"EOS",{});var Vp=r(en);eg=l(Vp,"` for target language documents.\n"),T(tn.$$.fragment,Vp),tg=p(Vp),it=s(Vp,"DIV",{class:!0});var Ja=r(it);T(ts.$$.fragment,Ja),og=p(Ja),os=s(Ja,"P",{});var Pu=r(os);ng=l(Pu,`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 `),md=s(Pu,"CODE",{});var Ew=r(md);ag=l(Ew,"X"),Ew.forEach(t),sg=l(Pu," represents the sequence:"),Pu.forEach(t),rg=p(Ja),ns=s(Ja,"UL",{});var Ou=r(ns);as=s(Ou,"LI",{});var Du=r(as);fd=s(Du,"CODE",{});var Cw=r(fd);ig=l(Cw,"input_ids"),Cw.forEach(t),lg=l(Du," (for encoder) "),gd=s(Du,"CODE",{});var qw=r(gd);dg=l(qw,"X [eos, src_lang_code]"),qw.forEach(t),Du.forEach(t),cg=p(Ou),ss=s(Ou,"LI",{});var Hu=r(ss);_d=s(Hu,"CODE",{});var Iw=r(_d);pg=l(Iw,"decoder_input_ids"),Iw.forEach(t),ug=l(Hu,": (for decoder) "),yd=s(Hu,"CODE",{});var Zw=r(yd);hg=l(Zw,"X [eos, tgt_lang_code]"),Zw.forEach(t),Hu.forEach(t),Ou.forEach(t),mg=p(Ja),bd=s(Ja,"P",{});var Gw=r(bd);fg=l(Gw,`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),Gw.forEach(t),Ja.forEach(t),Vp.forEach(t),Bw.forEach(t),Rt.forEach(t),uu=p(o),go=s(o,"H2",{class:!0});var Lu=r(go);on=s(Lu,"A",{id:!0,class:!0,href:!0});var Ww=r(on);Md=s(Ww,"SPAN",{});var Nw=r(Md);T(rs.$$.fragment,Nw),Nw.forEach(t),Ww.forEach(t),gg=p(Lu),Td=s(Lu,"SPAN",{});var Rw=r(Td);_g=l(Rw,"MBartTokenizerFast"),Rw.forEach(t),Lu.forEach(t),hu=p(o),$e=s(o,"DIV",{class:!0});var Xt=r($e);T(is.$$.fragment,Xt),yg=p(Xt),_o=s(Xt,"P",{});var gl=r(_o);bg=l(gl,"Construct a \u201Cfast\u201D MBART tokenizer (backed by HuggingFace\u2019s "),kd=s(gl,"EM",{});var Xw=r(kd);Mg=l(Xw,"tokenizers"),Xw.forEach(t),Tg=l(gl,` library). Based on
`),ls=s(gl,"A",{href:!0,rel:!0});var Vw=r(ls);kg=l(Vw,"BPE"),Vw.forEach(t),vg=l(gl,"."),gl.forEach(t),wg=p(Xt),ds=s(Xt,"P",{});var Ku=r(ds);Jg=l(Ku,"This tokenizer inherits from "),Qi=s(Ku,"A",{href:!0});var Sw=r(Qi);Fg=l(Sw,"PreTrainedTokenizerFast"),Sw.forEach(t),Ug=l(Ku,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Ku.forEach(t),zg=p(Xt),nn=s(Xt,"P",{});var Sp=r(nn);jg=l(Sp,"The tokenization method is "),vd=s(Sp,"CODE",{});var Aw=r(vd);$g=l(Aw,"<tokens> <eos> <language code>"),Aw.forEach(t),xg=l(Sp," for source language documents, and `"),wd=s(Sp,"LANGUAGE",{code:!0}),r(wd).forEach(t),Sp.forEach(t),Bg=p(Xt),Jd=s(Xt,"TOKENS",{});var Yw=r(Jd);Ge=s(Yw,"EOS",{});var Gt=r(Ge);Eg=l(Gt,"` for target language documents.\n"),T(an.$$.fragment,Gt),Cg=p(Gt),We=s(Gt,"DIV",{class:!0});var Vt=r(We);T(cs.$$.fragment,Vt),qg=p(Vt),Fd=s(Vt,"P",{});var Qw=r(Fd);Ig=l(Qw,`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.`),Qw.forEach(t),Zg=p(Vt),ps=s(Vt,"P",{});var eh=r(ps);Gg=l(eh,"An MBART sequence has the following format, where "),Ud=s(eh,"CODE",{});var Pw=r(Ud);Wg=l(Pw,"X"),Pw.forEach(t),Ng=l(eh," represents the sequence:"),eh.forEach(t),Rg=p(Vt),us=s(Vt,"UL",{});var th=r(us);hs=s(th,"LI",{});var oh=r(hs);zd=s(oh,"CODE",{});var Ow=r(zd);Xg=l(Ow,"input_ids"),Ow.forEach(t),Vg=l(oh," (for encoder) "),jd=s(oh,"CODE",{});var Dw=r(jd);Sg=l(Dw,"X [eos, src_lang_code]"),Dw.forEach(t),oh.forEach(t),Ag=p(th),ms=s(th,"LI",{});var nh=r(ms);$d=s(nh,"CODE",{});var Hw=r($d);Yg=l(Hw,"decoder_input_ids"),Hw.forEach(t),Qg=l(nh,": (for decoder) "),xd=s(nh,"CODE",{});var Lw=r(xd);Pg=l(Lw,"X [eos, tgt_lang_code]"),Lw.forEach(t),nh.forEach(t),th.forEach(t),Og=p(Vt),Bd=s(Vt,"P",{});var Kw=r(Bd);Dg=l(Kw,`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),Kw.forEach(t),Vt.forEach(t),Hg=p(Gt),sn=s(Gt,"DIV",{class:!0});var ah=r(sn);T(fs.$$.fragment,ah),Lg=p(ah),Ed=s(ah,"P",{});var e2=r(Ed);Kg=l(e2,`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.`),e2.forEach(t),ah.forEach(t),e_=p(Gt),rn=s(Gt,"DIV",{class:!0});var sh=r(rn);T(gs.$$.fragment,sh),t_=p(sh),Cd=s(sh,"P",{});var t2=r(Cd);o_=l(t2,"Reset the special tokens to the source lang setting. No prefix and suffix=[eos, src_lang_code]."),t2.forEach(t),sh.forEach(t),n_=p(Gt),ln=s(Gt,"DIV",{class:!0});var rh=r(ln);T(_s.$$.fragment,rh),a_=p(rh),qd=s(rh,"P",{});var o2=r(qd);s_=l(o2,"Reset the special tokens to the target language setting. No prefix and suffix=[eos, tgt_lang_code]."),o2.forEach(t),rh.forEach(t),Gt.forEach(t),Yw.forEach(t),Xt.forEach(t),mu=p(o),yo=s(o,"H2",{class:!0});var ih=r(yo);dn=s(ih,"A",{id:!0,class:!0,href:!0});var n2=r(dn);Id=s(n2,"SPAN",{});var a2=r(Id);T(ys.$$.fragment,a2),a2.forEach(t),n2.forEach(t),r_=p(ih),Zd=s(ih,"SPAN",{});var s2=r(Zd);i_=l(s2,"MBart50Tokenizer"),s2.forEach(t),ih.forEach(t),fu=p(o),N=s(o,"DIV",{class:!0});var te=r(N);T(bs.$$.fragment,te),l_=p(te),Ms=s(te,"P",{});var lh=r(Ms);d_=l(lh,"Construct a MBart50 tokenizer. Based on "),Ts=s(lh,"A",{href:!0,rel:!0});var r2=r(Ts);c_=l(r2,"SentencePiece"),r2.forEach(t),p_=l(lh,"."),lh.forEach(t),u_=p(te),ks=s(te,"P",{});var dh=r(ks);h_=l(dh,"This tokenizer inherits from "),Pi=s(dh,"A",{href:!0});var i2=r(Pi);m_=l(i2,"PreTrainedTokenizer"),i2.forEach(t),f_=l(dh,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),dh.forEach(t),g_=p(te),T(cn.$$.fragment,te),__=p(te),lt=s(te,"DIV",{class:!0});var Fa=r(lt);T(vs.$$.fragment,Fa),y_=p(Fa),ws=s(Fa,"P",{});var ch=r(ws);b_=l(ch,`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 `),Gd=s(ch,"CODE",{});var l2=r(Gd);M_=l(l2,"X"),l2.forEach(t),T_=l(ch," represents the sequence:"),ch.forEach(t),k_=p(Fa),Js=s(Fa,"UL",{});var ph=r(Js);Fs=s(ph,"LI",{});var uh=r(Fs);Wd=s(uh,"CODE",{});var d2=r(Wd);v_=l(d2,"input_ids"),d2.forEach(t),w_=l(uh," (for encoder) "),Nd=s(uh,"CODE",{});var c2=r(Nd);J_=l(c2,"[src_lang_code] X [eos]"),c2.forEach(t),uh.forEach(t),F_=p(ph),Us=s(ph,"LI",{});var hh=r(Us);Rd=s(hh,"CODE",{});var p2=r(Rd);U_=l(p2,"labels"),p2.forEach(t),z_=l(hh,": (for decoder) "),Xd=s(hh,"CODE",{});var u2=r(Xd);j_=l(u2,"[tgt_lang_code] X [eos]"),u2.forEach(t),hh.forEach(t),ph.forEach(t),$_=p(Fa),Vd=s(Fa,"P",{});var h2=r(Vd);x_=l(h2,`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),h2.forEach(t),Fa.forEach(t),B_=p(te),pn=s(te,"DIV",{class:!0});var mh=r(pn);T(zs.$$.fragment,mh),E_=p(mh),Sd=s(mh,"P",{});var m2=r(Sd);C_=l(m2,"Converts a sequence of tokens (string) in a single string."),m2.forEach(t),mh.forEach(t),q_=p(te),un=s(te,"DIV",{class:!0});var fh=r(un);T(js.$$.fragment,fh),I_=p(fh),$s=s(fh,"P",{});var gh=r($s);Z_=l(gh,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Ad=s(gh,"CODE",{});var f2=r(Ad);G_=l(f2,"prepare_for_model"),f2.forEach(t),W_=l(gh," method."),gh.forEach(t),fh.forEach(t),N_=p(te),hn=s(te,"DIV",{class:!0});var _h=r(hn);T(xs.$$.fragment,_h),R_=p(_h),Yd=s(_h,"P",{});var g2=r(Yd);X_=l(g2,"Reset the special tokens to the source lang setting. prefix=[src_lang_code] and suffix=[eos]."),g2.forEach(t),_h.forEach(t),V_=p(te),mn=s(te,"DIV",{class:!0});var yh=r(mn);T(Bs.$$.fragment,yh),S_=p(yh),Qd=s(yh,"P",{});var _2=r(Qd);A_=l(_2,"Reset the special tokens to the target language setting. prefix=[tgt_lang_code] and suffix=[eos]."),_2.forEach(t),yh.forEach(t),te.forEach(t),gu=p(o),bo=s(o,"H2",{class:!0});var bh=r(bo);fn=s(bh,"A",{id:!0,class:!0,href:!0});var y2=r(fn);Pd=s(y2,"SPAN",{});var b2=r(Pd);T(Es.$$.fragment,b2),b2.forEach(t),y2.forEach(t),Y_=p(bh),Od=s(bh,"SPAN",{});var M2=r(Od);Q_=l(M2,"MBart50TokenizerFast"),M2.forEach(t),bh.forEach(t),_u=p(o),L=s(o,"DIV",{class:!0});var Ae=r(L);T(Cs.$$.fragment,Ae),P_=p(Ae),Mo=s(Ae,"P",{});var _l=r(Mo);O_=l(_l,"Construct a \u201Cfast\u201D MBART tokenizer for mBART-50 (backed by HuggingFace\u2019s "),Dd=s(_l,"EM",{});var T2=r(Dd);D_=l(T2,"tokenizers"),T2.forEach(t),H_=l(_l,` library). Based on
`),qs=s(_l,"A",{href:!0,rel:!0});var k2=r(qs);L_=l(k2,"BPE"),k2.forEach(t),K_=l(_l,"."),_l.forEach(t),ey=p(Ae),Is=s(Ae,"P",{});var Mh=r(Is);ty=l(Mh,"This tokenizer inherits from "),Oi=s(Mh,"A",{href:!0});var v2=r(Oi);oy=l(v2,"PreTrainedTokenizerFast"),v2.forEach(t),ny=l(Mh,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Mh.forEach(t),ay=p(Ae),T(gn.$$.fragment,Ae),sy=p(Ae),Ne=s(Ae,"DIV",{class:!0});var St=r(Ne);T(Zs.$$.fragment,St),ry=p(St),Hd=s(St,"P",{});var w2=r(Hd);iy=l(w2,`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.`),w2.forEach(t),ly=p(St),Gs=s(St,"P",{});var Th=r(Gs);dy=l(Th,"An MBART-50 sequence has the following format, where "),Ld=s(Th,"CODE",{});var J2=r(Ld);cy=l(J2,"X"),J2.forEach(t),py=l(Th," represents the sequence:"),Th.forEach(t),uy=p(St),Ws=s(St,"UL",{});var kh=r(Ws);Ns=s(kh,"LI",{});var vh=r(Ns);Kd=s(vh,"CODE",{});var F2=r(Kd);hy=l(F2,"input_ids"),F2.forEach(t),my=l(vh," (for encoder) "),ec=s(vh,"CODE",{});var U2=r(ec);fy=l(U2,"[src_lang_code] X [eos]"),U2.forEach(t),vh.forEach(t),gy=p(kh),Rs=s(kh,"LI",{});var wh=r(Rs);tc=s(wh,"CODE",{});var z2=r(tc);_y=l(z2,"labels"),z2.forEach(t),yy=l(wh,": (for decoder) "),oc=s(wh,"CODE",{});var j2=r(oc);by=l(j2,"[tgt_lang_code] X [eos]"),j2.forEach(t),wh.forEach(t),kh.forEach(t),My=p(St),nc=s(St,"P",{});var $2=r(nc);Ty=l($2,`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),$2.forEach(t),St.forEach(t),ky=p(Ae),_n=s(Ae,"DIV",{class:!0});var Jh=r(_n);T(Xs.$$.fragment,Jh),vy=p(Jh),ac=s(Jh,"P",{});var x2=r(ac);wy=l(x2,"Reset the special tokens to the source lang setting. prefix=[src_lang_code] and suffix=[eos]."),x2.forEach(t),Jh.forEach(t),Jy=p(Ae),yn=s(Ae,"DIV",{class:!0});var Fh=r(yn);T(Vs.$$.fragment,Fh),Fy=p(Fh),sc=s(Fh,"P",{});var B2=r(sc);Uy=l(B2,"Reset the special tokens to the target language setting. prefix=[src_lang_code] and suffix=[eos]."),B2.forEach(t),Fh.forEach(t),Ae.forEach(t),yu=p(o),To=s(o,"H2",{class:!0});var Uh=r(To);bn=s(Uh,"A",{id:!0,class:!0,href:!0});var E2=r(bn);rc=s(E2,"SPAN",{});var C2=r(rc);T(Ss.$$.fragment,C2),C2.forEach(t),E2.forEach(t),zy=p(Uh),ic=s(Uh,"SPAN",{});var q2=r(ic);jy=l(q2,"MBartModel"),q2.forEach(t),Uh.forEach(t),bu=p(o),Ke=s(o,"DIV",{class:!0});var Ua=r(Ke);T(As.$$.fragment,Ua),$y=p(Ua),Ys=s(Ua,"P",{});var zh=r(Ys);xy=l(zh,`The bare MBART Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Di=s(zh,"A",{href:!0});var I2=r(Di);By=l(I2,"PreTrainedModel"),I2.forEach(t),Ey=l(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),Cy=p(Ua),Qs=s(Ua,"P",{});var jh=r(Qs);qy=l(jh,"This model is also a PyTorch "),Ps=s(jh,"A",{href:!0,rel:!0});var Z2=r(Ps);Iy=l(Z2,"torch.nn.Module"),Z2.forEach(t),Zy=l(jh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),jh.forEach(t),Gy=p(Ua),dt=s(Ua,"DIV",{class:!0});var za=r(dt);T(Os.$$.fragment,za),Wy=p(za),ko=s(za,"P",{});var yl=r(ko);Ny=l(yl,"The "),Hi=s(yl,"A",{href:!0});var G2=r(Hi);Ry=l(G2,"MBartModel"),G2.forEach(t),Xy=l(yl," forward method, overrides the "),lc=s(yl,"CODE",{});var W2=r(lc);Vy=l(W2,"__call__"),W2.forEach(t),Sy=l(yl," special method."),yl.forEach(t),Ay=p(za),T(Mn.$$.fragment,za),Yy=p(za),T(Tn.$$.fragment,za),za.forEach(t),Ua.forEach(t),Mu=p(o),vo=s(o,"H2",{class:!0});var $h=r(vo);kn=s($h,"A",{id:!0,class:!0,href:!0});var N2=r(kn);dc=s(N2,"SPAN",{});var R2=r(dc);T(Ds.$$.fragment,R2),R2.forEach(t),N2.forEach(t),Qy=p($h),cc=s($h,"SPAN",{});var X2=r(cc);Py=l(X2,"MBartForConditionalGeneration"),X2.forEach(t),$h.forEach(t),Tu=p(o),et=s(o,"DIV",{class:!0});var ja=r(et);T(Hs.$$.fragment,ja),Oy=p(ja),Ls=s(ja,"P",{});var xh=r(Ls);Dy=l(xh,`The MBART Model with a language modeling head. Can be used for summarization, after fine-tuning the pretrained models.
This model inherits from `),Li=s(xh,"A",{href:!0});var V2=r(Li);Hy=l(V2,"PreTrainedModel"),V2.forEach(t),Ly=l(xh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),xh.forEach(t),Ky=p(ja),Ks=s(ja,"P",{});var Bh=r(Ks);eb=l(Bh,"This model is also a PyTorch "),er=s(Bh,"A",{href:!0,rel:!0});var S2=r(er);tb=l(S2,"torch.nn.Module"),S2.forEach(t),ob=l(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),nb=p(ja),Re=s(ja,"DIV",{class:!0});var At=r(Re);T(tr.$$.fragment,At),ab=p(At),wo=s(At,"P",{});var bl=r(wo);sb=l(bl,"The "),Ki=s(bl,"A",{href:!0});var A2=r(Ki);rb=l(A2,"MBartForConditionalGeneration"),A2.forEach(t),ib=l(bl," forward method, overrides the "),pc=s(bl,"CODE",{});var Y2=r(pc);lb=l(Y2,"__call__"),Y2.forEach(t),db=l(bl," special method."),bl.forEach(t),cb=p(At),T(vn.$$.fragment,At),pb=p(At),T(wn.$$.fragment,At),ub=p(At),T(Jn.$$.fragment,At),At.forEach(t),ja.forEach(t),ku=p(o),Jo=s(o,"H2",{class:!0});var Eh=r(Jo);Fn=s(Eh,"A",{id:!0,class:!0,href:!0});var Q2=r(Fn);uc=s(Q2,"SPAN",{});var P2=r(uc);T(or.$$.fragment,P2),P2.forEach(t),Q2.forEach(t),hb=p(Eh),hc=s(Eh,"SPAN",{});var O2=r(hc);mb=l(O2,"MBartForQuestionAnswering"),O2.forEach(t),Eh.forEach(t),vu=p(o),xe=s(o,"DIV",{class:!0});var Yt=r(xe);T(nr.$$.fragment,Yt),fb=p(Yt),Fo=s(Yt,"P",{});var Ml=r(Fo);gb=l(Ml,`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 `),mc=s(Ml,"CODE",{});var D2=r(mc);_b=l(D2,"span start logits"),D2.forEach(t),yb=l(Ml," and "),fc=s(Ml,"CODE",{});var H2=r(fc);bb=l(H2,"span end logits"),H2.forEach(t),Mb=l(Ml,")."),Ml.forEach(t),Tb=p(Yt),ar=s(Yt,"P",{});var Ch=r(ar);kb=l(Ch,"This model inherits from "),el=s(Ch,"A",{href:!0});var L2=r(el);vb=l(L2,"PreTrainedModel"),L2.forEach(t),wb=l(Ch,`. 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.)`),Ch.forEach(t),Jb=p(Yt),sr=s(Yt,"P",{});var qh=r(sr);Fb=l(qh,"This model is also a PyTorch "),rr=s(qh,"A",{href:!0,rel:!0});var K2=r(rr);Ub=l(K2,"torch.nn.Module"),K2.forEach(t),zb=l(qh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),qh.forEach(t),jb=p(Yt),ct=s(Yt,"DIV",{class:!0});var $a=r(ct);T(ir.$$.fragment,$a),$b=p($a),Uo=s($a,"P",{});var Tl=r(Uo);xb=l(Tl,"The "),tl=s(Tl,"A",{href:!0});var e1=r(tl);Bb=l(e1,"MBartForQuestionAnswering"),e1.forEach(t),Eb=l(Tl," forward method, overrides the "),gc=s(Tl,"CODE",{});var t1=r(gc);Cb=l(t1,"__call__"),t1.forEach(t),qb=l(Tl," special method."),Tl.forEach(t),Ib=p($a),T(Un.$$.fragment,$a),Zb=p($a),T(zn.$$.fragment,$a),$a.forEach(t),Yt.forEach(t),wu=p(o),zo=s(o,"H2",{class:!0});var Ih=r(zo);jn=s(Ih,"A",{id:!0,class:!0,href:!0});var o1=r(jn);_c=s(o1,"SPAN",{});var n1=r(_c);T(lr.$$.fragment,n1),n1.forEach(t),o1.forEach(t),Gb=p(Ih),yc=s(Ih,"SPAN",{});var a1=r(yc);Wb=l(a1,"MBartForSequenceClassification"),a1.forEach(t),Ih.forEach(t),Ju=p(o),Be=s(o,"DIV",{class:!0});var Qt=r(Be);T(dr.$$.fragment,Qt),Nb=p(Qt),bc=s(Qt,"P",{});var s1=r(bc);Rb=l(s1,`MBart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),s1.forEach(t),Xb=p(Qt),cr=s(Qt,"P",{});var Zh=r(cr);Vb=l(Zh,"This model inherits from "),ol=s(Zh,"A",{href:!0});var r1=r(ol);Sb=l(r1,"PreTrainedModel"),r1.forEach(t),Ab=l(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),Yb=p(Qt),pr=s(Qt,"P",{});var Gh=r(pr);Qb=l(Gh,"This model is also a PyTorch "),ur=s(Gh,"A",{href:!0,rel:!0});var i1=r(ur);Pb=l(i1,"torch.nn.Module"),i1.forEach(t),Ob=l(Gh,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Gh.forEach(t),Db=p(Qt),Xe=s(Qt,"DIV",{class:!0});var Pt=r(Xe);T(hr.$$.fragment,Pt),Hb=p(Pt),jo=s(Pt,"P",{});var kl=r(jo);Lb=l(kl,"The "),nl=s(kl,"A",{href:!0});var l1=r(nl);Kb=l(l1,"MBartForSequenceClassification"),l1.forEach(t),eM=l(kl," forward method, overrides the "),Mc=s(kl,"CODE",{});var d1=r(Mc);tM=l(d1,"__call__"),d1.forEach(t),oM=l(kl," special method."),kl.forEach(t),nM=p(Pt),T($n.$$.fragment,Pt),aM=p(Pt),T(xn.$$.fragment,Pt),sM=p(Pt),T(Bn.$$.fragment,Pt),Pt.forEach(t),Qt.forEach(t),Fu=p(o),$o=s(o,"H2",{class:!0});var Wh=r($o);En=s(Wh,"A",{id:!0,class:!0,href:!0});var c1=r(En);Tc=s(c1,"SPAN",{});var p1=r(Tc);T(mr.$$.fragment,p1),p1.forEach(t),c1.forEach(t),rM=p(Wh),kc=s(Wh,"SPAN",{});var u1=r(kc);iM=l(u1,"MBartForCausalLM"),u1.forEach(t),Wh.forEach(t),Uu=p(o),xo=s(o,"DIV",{class:!0});var Nh=r(xo);T(fr.$$.fragment,Nh),lM=p(Nh),Cn=s(Nh,"DIV",{class:!0});var Rh=r(Cn);T(gr.$$.fragment,Rh),dM=p(Rh),T(qn.$$.fragment,Rh),Rh.forEach(t),Nh.forEach(t),zu=p(o),Bo=s(o,"H2",{class:!0});var Xh=r(Bo);In=s(Xh,"A",{id:!0,class:!0,href:!0});var h1=r(In);vc=s(h1,"SPAN",{});var m1=r(vc);T(_r.$$.fragment,m1),m1.forEach(t),h1.forEach(t),cM=p(Xh),wc=s(Xh,"SPAN",{});var f1=r(wc);pM=l(f1,"TFMBartModel"),f1.forEach(t),Xh.forEach(t),ju=p(o),Ee=s(o,"DIV",{class:!0});var Ot=r(Ee);T(yr.$$.fragment,Ot),uM=p(Ot),br=s(Ot,"P",{});var Vh=r(br);hM=l(Vh,`The bare MBART Model outputting raw hidden-states without any specific head on top.
This model inherits from `),al=s(Vh,"A",{href:!0});var g1=r(al);mM=l(g1,"TFPreTrainedModel"),g1.forEach(t),fM=l(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),gM=p(Ot),Mr=s(Ot,"P",{});var Sh=r(Mr);_M=l(Sh,"This model is also a "),Tr=s(Sh,"A",{href:!0,rel:!0});var _1=r(Tr);yM=l(_1,"tf.keras.Model"),_1.forEach(t),bM=l(Sh,` 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.`),Sh.forEach(t),MM=p(Ot),T(Zn.$$.fragment,Ot),TM=p(Ot),pt=s(Ot,"DIV",{class:!0});var xa=r(pt);T(kr.$$.fragment,xa),kM=p(xa),Eo=s(xa,"P",{});var vl=r(Eo);vM=l(vl,"The "),sl=s(vl,"A",{href:!0});var y1=r(sl);wM=l(y1,"TFMBartModel"),y1.forEach(t),JM=l(vl," forward method, overrides the "),Jc=s(vl,"CODE",{});var b1=r(Jc);FM=l(b1,"__call__"),b1.forEach(t),UM=l(vl," special method."),vl.forEach(t),zM=p(xa),T(Gn.$$.fragment,xa),jM=p(xa),T(Wn.$$.fragment,xa),xa.forEach(t),Ot.forEach(t),$u=p(o),Co=s(o,"H2",{class:!0});var Ah=r(Co);Nn=s(Ah,"A",{id:!0,class:!0,href:!0});var M1=r(Nn);Fc=s(M1,"SPAN",{});var T1=r(Fc);T(vr.$$.fragment,T1),T1.forEach(t),M1.forEach(t),$M=p(Ah),Uc=s(Ah,"SPAN",{});var k1=r(Uc);xM=l(k1,"TFMBartForConditionalGeneration"),k1.forEach(t),Ah.forEach(t),xu=p(o),Ce=s(o,"DIV",{class:!0});var Dt=r(Ce);T(wr.$$.fragment,Dt),BM=p(Dt),Jr=s(Dt,"P",{});var Yh=r(Jr);EM=l(Yh,`The MBART Model with a language modeling head. Can be used for summarization, after fine-tuning the pretrained models.
This model inherits from `),rl=s(Yh,"A",{href:!0});var v1=r(rl);CM=l(v1,"TFPreTrainedModel"),v1.forEach(t),qM=l(Yh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Yh.forEach(t),IM=p(Dt),Fr=s(Dt,"P",{});var Qh=r(Fr);ZM=l(Qh,"This model is also a "),Ur=s(Qh,"A",{href:!0,rel:!0});var w1=r(Ur);GM=l(w1,"tf.keras.Model"),w1.forEach(t),WM=l(Qh,` 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.`),Qh.forEach(t),NM=p(Dt),T(Rn.$$.fragment,Dt),RM=p(Dt),Ve=s(Dt,"DIV",{class:!0});var Ht=r(Ve);T(zr.$$.fragment,Ht),XM=p(Ht),qo=s(Ht,"P",{});var wl=r(qo);VM=l(wl,"The "),il=s(wl,"A",{href:!0});var J1=r(il);SM=l(J1,"TFMBartForConditionalGeneration"),J1.forEach(t),AM=l(wl," forward method, overrides the "),zc=s(wl,"CODE",{});var F1=r(zc);YM=l(F1,"__call__"),F1.forEach(t),QM=l(wl," special method."),wl.forEach(t),PM=p(Ht),T(Xn.$$.fragment,Ht),OM=p(Ht),T(Vn.$$.fragment,Ht),DM=p(Ht),T(Sn.$$.fragment,Ht),Ht.forEach(t),Dt.forEach(t),Bu=p(o),Io=s(o,"H2",{class:!0});var Ph=r(Io);An=s(Ph,"A",{id:!0,class:!0,href:!0});var U1=r(An);jc=s(U1,"SPAN",{});var z1=r(jc);T(jr.$$.fragment,z1),z1.forEach(t),U1.forEach(t),HM=p(Ph),$c=s(Ph,"SPAN",{});var j1=r($c);LM=l(j1,"FlaxMBartModel"),j1.forEach(t),Ph.forEach(t),Eu=p(o),Q=s(o,"DIV",{class:!0});var _e=r(Q);T($r.$$.fragment,_e),KM=p(_e),xr=s(_e,"P",{});var Oh=r(xr);eT=l(Oh,`The bare MBart Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),ll=s(Oh,"A",{href:!0});var $1=r(ll);tT=l($1,"FlaxPreTrainedModel"),$1.forEach(t),oT=l(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),nT=p(_e),Br=s(_e,"P",{});var Dh=r(Br);aT=l(Dh,`This model is also a Flax Linen
`),Er=s(Dh,"A",{href:!0,rel:!0});var x1=r(Er);sT=l(x1,"flax.nn.Module"),x1.forEach(t),rT=l(Dh,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Dh.forEach(t),iT=p(_e),xc=s(_e,"P",{});var B1=r(xc);lT=l(B1,"Finally, this model supports inherent JAX features such as:"),B1.forEach(t),dT=p(_e),Et=s(_e,"UL",{});var Ba=r(Et);Bc=s(Ba,"LI",{});var E1=r(Bc);Cr=s(E1,"A",{href:!0,rel:!0});var C1=r(Cr);cT=l(C1,"Just-In-Time (JIT) compilation"),C1.forEach(t),E1.forEach(t),pT=p(Ba),Ec=s(Ba,"LI",{});var q1=r(Ec);qr=s(q1,"A",{href:!0,rel:!0});var I1=r(qr);uT=l(I1,"Automatic Differentiation"),I1.forEach(t),q1.forEach(t),hT=p(Ba),Cc=s(Ba,"LI",{});var Z1=r(Cc);Ir=s(Z1,"A",{href:!0,rel:!0});var G1=r(Ir);mT=l(G1,"Vectorization"),G1.forEach(t),Z1.forEach(t),fT=p(Ba),qc=s(Ba,"LI",{});var W1=r(qc);Zr=s(W1,"A",{href:!0,rel:!0});var N1=r(Zr);gT=l(N1,"Parallelization"),N1.forEach(t),W1.forEach(t),Ba.forEach(t),_T=p(_e),ut=s(_e,"DIV",{class:!0});var Ea=r(ut);T(Gr.$$.fragment,Ea),yT=p(Ea),Zo=s(Ea,"P",{});var Jl=r(Zo);bT=l(Jl,"The "),Ic=s(Jl,"CODE",{});var R1=r(Ic);MT=l(R1,"FlaxMBartPreTrainedModel"),R1.forEach(t),TT=l(Jl," forward method, overrides the "),Zc=s(Jl,"CODE",{});var X1=r(Zc);kT=l(X1,"__call__"),X1.forEach(t),vT=l(Jl," special method."),Jl.forEach(t),wT=p(Ea),T(Yn.$$.fragment,Ea),JT=p(Ea),T(Qn.$$.fragment,Ea),Ea.forEach(t),FT=p(_e),Pn=s(_e,"DIV",{class:!0});var Hh=r(Pn);T(Wr.$$.fragment,Hh),UT=p(Hh),T(On.$$.fragment,Hh),Hh.forEach(t),zT=p(_e),Dn=s(_e,"DIV",{class:!0});var Lh=r(Dn);T(Nr.$$.fragment,Lh),jT=p(Lh),T(Hn.$$.fragment,Lh),Lh.forEach(t),_e.forEach(t),Cu=p(o),Go=s(o,"H2",{class:!0});var Kh=r(Go);Ln=s(Kh,"A",{id:!0,class:!0,href:!0});var V1=r(Ln);Gc=s(V1,"SPAN",{});var S1=r(Gc);T(Rr.$$.fragment,S1),S1.forEach(t),V1.forEach(t),$T=p(Kh),Wc=s(Kh,"SPAN",{});var A1=r(Wc);xT=l(A1,"FlaxMBartForConditionalGeneration"),A1.forEach(t),Kh.forEach(t),qu=p(o),P=s(o,"DIV",{class:!0});var ye=r(P);T(Xr.$$.fragment,ye),BT=p(ye),Vr=s(ye,"P",{});var em=r(Vr);ET=l(em,`The MMBart Model with a language modeling head. Can be used for summarization.
This model inherits from `),dl=s(em,"A",{href:!0});var Y1=r(dl);CT=l(Y1,"FlaxPreTrainedModel"),Y1.forEach(t),qT=l(em,`. 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.)`),em.forEach(t),IT=p(ye),Sr=s(ye,"P",{});var tm=r(Sr);ZT=l(tm,`This model is also a Flax Linen
`),Ar=s(tm,"A",{href:!0,rel:!0});var Q1=r(Ar);GT=l(Q1,"flax.nn.Module"),Q1.forEach(t),WT=l(tm,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),tm.forEach(t),NT=p(ye),Nc=s(ye,"P",{});var P1=r(Nc);RT=l(P1,"Finally, this model supports inherent JAX features such as:"),P1.forEach(t),XT=p(ye),Ct=s(ye,"UL",{});var Ca=r(Ct);Rc=s(Ca,"LI",{});var O1=r(Rc);Yr=s(O1,"A",{href:!0,rel:!0});var D1=r(Yr);VT=l(D1,"Just-In-Time (JIT) compilation"),D1.forEach(t),O1.forEach(t),ST=p(Ca),Xc=s(Ca,"LI",{});var H1=r(Xc);Qr=s(H1,"A",{href:!0,rel:!0});var L1=r(Qr);AT=l(L1,"Automatic Differentiation"),L1.forEach(t),H1.forEach(t),YT=p(Ca),Vc=s(Ca,"LI",{});var K1=r(Vc);Pr=s(K1,"A",{href:!0,rel:!0});var e0=r(Pr);QT=l(e0,"Vectorization"),e0.forEach(t),K1.forEach(t),PT=p(Ca),Sc=s(Ca,"LI",{});var t0=r(Sc);Or=s(t0,"A",{href:!0,rel:!0});var o0=r(Or);OT=l(o0,"Parallelization"),o0.forEach(t),t0.forEach(t),Ca.forEach(t),DT=p(ye),Se=s(ye,"DIV",{class:!0});var Lt=r(Se);T(Dr.$$.fragment,Lt),HT=p(Lt),Wo=s(Lt,"P",{});var Fl=r(Wo);LT=l(Fl,"The "),Ac=s(Fl,"CODE",{});var n0=r(Ac);KT=l(n0,"FlaxMBartPreTrainedModel"),n0.forEach(t),ek=l(Fl," forward method, overrides the "),Yc=s(Fl,"CODE",{});var a0=r(Yc);tk=l(a0,"__call__"),a0.forEach(t),ok=l(Fl," special method."),Fl.forEach(t),nk=p(Lt),T(Kn.$$.fragment,Lt),ak=p(Lt),T(ea.$$.fragment,Lt),sk=p(Lt),T(ta.$$.fragment,Lt),Lt.forEach(t),rk=p(ye),oa=s(ye,"DIV",{class:!0});var om=r(oa);T(Hr.$$.fragment,om),ik=p(om),T(na.$$.fragment,om),om.forEach(t),lk=p(ye),aa=s(ye,"DIV",{class:!0});var nm=r(aa);T(Lr.$$.fragment,nm),dk=p(nm),T(sa.$$.fragment,nm),nm.forEach(t),ye.forEach(t),Iu=p(o),No=s(o,"H2",{class:!0});var am=r(No);ra=s(am,"A",{id:!0,class:!0,href:!0});var s0=r(ra);Qc=s(s0,"SPAN",{});var r0=r(Qc);T(Kr.$$.fragment,r0),r0.forEach(t),s0.forEach(t),ck=p(am),Pc=s(am,"SPAN",{});var i0=r(Pc);pk=l(i0,"FlaxMBartForSequenceClassification"),i0.forEach(t),am.forEach(t),Zu=p(o),R=s(o,"DIV",{class:!0});var oe=r(R);T(ei.$$.fragment,oe),uk=p(oe),Oc=s(oe,"P",{});var l0=r(Oc);hk=l(l0,`MBart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),l0.forEach(t),mk=p(oe),ti=s(oe,"P",{});var sm=r(ti);fk=l(sm,"This model inherits from "),cl=s(sm,"A",{href:!0});var d0=r(cl);gk=l(d0,"FlaxPreTrainedModel"),d0.forEach(t),_k=l(sm,`. 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.)`),sm.forEach(t),yk=p(oe),oi=s(oe,"P",{});var rm=r(oi);bk=l(rm,`This model is also a Flax Linen
`),ni=s(rm,"A",{href:!0,rel:!0});var c0=r(ni);Mk=l(c0,"flax.nn.Module"),c0.forEach(t),Tk=l(rm,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),rm.forEach(t),kk=p(oe),Dc=s(oe,"P",{});var p0=r(Dc);vk=l(p0,"Finally, this model supports inherent JAX features such as:"),p0.forEach(t),wk=p(oe),qt=s(oe,"UL",{});var qa=r(qt);Hc=s(qa,"LI",{});var u0=r(Hc);ai=s(u0,"A",{href:!0,rel:!0});var h0=r(ai);Jk=l(h0,"Just-In-Time (JIT) compilation"),h0.forEach(t),u0.forEach(t),Fk=p(qa),Lc=s(qa,"LI",{});var m0=r(Lc);si=s(m0,"A",{href:!0,rel:!0});var f0=r(si);Uk=l(f0,"Automatic Differentiation"),f0.forEach(t),m0.forEach(t),zk=p(qa),Kc=s(qa,"LI",{});var g0=r(Kc);ri=s(g0,"A",{href:!0,rel:!0});var _0=r(ri);jk=l(_0,"Vectorization"),_0.forEach(t),g0.forEach(t),$k=p(qa),ep=s(qa,"LI",{});var y0=r(ep);ii=s(y0,"A",{href:!0,rel:!0});var b0=r(ii);xk=l(b0,"Parallelization"),b0.forEach(t),y0.forEach(t),qa.forEach(t),Bk=p(oe),ht=s(oe,"DIV",{class:!0});var Ia=r(ht);T(li.$$.fragment,Ia),Ek=p(Ia),Ro=s(Ia,"P",{});var Ul=r(Ro);Ck=l(Ul,"The "),tp=s(Ul,"CODE",{});var M0=r(tp);qk=l(M0,"FlaxMBartPreTrainedModel"),M0.forEach(t),Ik=l(Ul," forward method, overrides the "),op=s(Ul,"CODE",{});var T0=r(op);Zk=l(T0,"__call__"),T0.forEach(t),Gk=l(Ul," special method."),Ul.forEach(t),Wk=p(Ia),T(ia.$$.fragment,Ia),Nk=p(Ia),T(la.$$.fragment,Ia),Ia.forEach(t),Rk=p(oe),da=s(oe,"DIV",{class:!0});var im=r(da);T(di.$$.fragment,im),Xk=p(im),T(ca.$$.fragment,im),im.forEach(t),Vk=p(oe),pa=s(oe,"DIV",{class:!0});var lm=r(pa);T(ci.$$.fragment,lm),Sk=p(lm),T(ua.$$.fragment,lm),lm.forEach(t),oe.forEach(t),Gu=p(o),Xo=s(o,"H2",{class:!0});var dm=r(Xo);ha=s(dm,"A",{id:!0,class:!0,href:!0});var k0=r(ha);np=s(k0,"SPAN",{});var v0=r(np);T(pi.$$.fragment,v0),v0.forEach(t),k0.forEach(t),Ak=p(dm),ap=s(dm,"SPAN",{});var w0=r(ap);Yk=l(w0,"FlaxMBartForQuestionAnswering"),w0.forEach(t),dm.forEach(t),Wu=p(o),X=s(o,"DIV",{class:!0});var ne=r(X);T(ui.$$.fragment,ne),Qk=p(ne),Vo=s(ne,"P",{});var zl=r(Vo);Pk=l(zl,`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 `),sp=s(zl,"CODE",{});var J0=r(sp);Ok=l(J0,"span start logits"),J0.forEach(t),Dk=l(zl," and "),rp=s(zl,"CODE",{});var F0=r(rp);Hk=l(F0,"span end logits"),F0.forEach(t),Lk=l(zl,")."),zl.forEach(t),Kk=p(ne),hi=s(ne,"P",{});var cm=r(hi);ev=l(cm,"This model inherits from "),pl=s(cm,"A",{href:!0});var U0=r(pl);tv=l(U0,"FlaxPreTrainedModel"),U0.forEach(t),ov=l(cm,`. 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.)`),cm.forEach(t),nv=p(ne),mi=s(ne,"P",{});var pm=r(mi);av=l(pm,`This model is also a Flax Linen
`),fi=s(pm,"A",{href:!0,rel:!0});var z0=r(fi);sv=l(z0,"flax.nn.Module"),z0.forEach(t),rv=l(pm,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),pm.forEach(t),iv=p(ne),ip=s(ne,"P",{});var j0=r(ip);lv=l(j0,"Finally, this model supports inherent JAX features such as:"),j0.forEach(t),dv=p(ne),It=s(ne,"UL",{});var Za=r(It);lp=s(Za,"LI",{});var $0=r(lp);gi=s($0,"A",{href:!0,rel:!0});var x0=r(gi);cv=l(x0,"Just-In-Time (JIT) compilation"),x0.forEach(t),$0.forEach(t),pv=p(Za),dp=s(Za,"LI",{});var B0=r(dp);_i=s(B0,"A",{href:!0,rel:!0});var E0=r(_i);uv=l(E0,"Automatic Differentiation"),E0.forEach(t),B0.forEach(t),hv=p(Za),cp=s(Za,"LI",{});var C0=r(cp);yi=s(C0,"A",{href:!0,rel:!0});var q0=r(yi);mv=l(q0,"Vectorization"),q0.forEach(t),C0.forEach(t),fv=p(Za),pp=s(Za,"LI",{});var I0=r(pp);bi=s(I0,"A",{href:!0,rel:!0});var Z0=r(bi);gv=l(Z0,"Parallelization"),Z0.forEach(t),I0.forEach(t),Za.forEach(t),_v=p(ne),mt=s(ne,"DIV",{class:!0});var Ga=r(mt);T(Mi.$$.fragment,Ga),yv=p(Ga),So=s(Ga,"P",{});var jl=r(So);bv=l(jl,"The "),up=s(jl,"CODE",{});var G0=r(up);Mv=l(G0,"FlaxMBartPreTrainedModel"),G0.forEach(t),Tv=l(jl," forward method, overrides the "),hp=s(jl,"CODE",{});var W0=r(hp);kv=l(W0,"__call__"),W0.forEach(t),vv=l(jl," special method."),jl.forEach(t),wv=p(Ga),T(ma.$$.fragment,Ga),Jv=p(Ga),T(fa.$$.fragment,Ga),Ga.forEach(t),Fv=p(ne),ga=s(ne,"DIV",{class:!0});var um=r(ga);T(Ti.$$.fragment,um),Uv=p(um),T(_a.$$.fragment,um),um.forEach(t),zv=p(ne),ya=s(ne,"DIV",{class:!0});var hm=r(ya);T(ki.$$.fragment,hm),jv=p(hm),T(ba.$$.fragment,hm),hm.forEach(t),ne.forEach(t),this.h()},h(){m(d,"name","hf:doc:metadata"),m(d,"content",JSON.stringify(EJ)),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(ce,"alt","Models"),N0(ce.src,$="https://img.shields.io/badge/All_model_pages-mbart-blueviolet")||m(ce,"src",$),m(qe,"href","https://huggingface.co/models?filter=mbart"),m(Ie,"alt","Spaces"),N0(Ie.src,Wt="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||m(Ie,"src",Wt),m(K,"href","https://huggingface.co/spaces/docs-demos/mbart-large-50-one-to-many-mmt"),m(A,"class","flex flex-wrap space-x-1"),m(Me,"href","https://github.com/huggingface/transformers/issues/new?assignees=&labels=&template=bug-report.md&title"),m(Me,"rel","nofollow"),m(ue,"id","overview-of-mbart"),m(ue,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(ue,"href","#overview-of-mbart"),m(Y,"class","relative group"),m(D,"href","https://arxiv.org/abs/2001.08210"),m(D,"rel","nofollow"),m(we,"href","https://huggingface.co/valhalla"),m(we,"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(H,"class","relative group"),m(Ue,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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(lo,"class","relative group"),m(Va,"href","https://arxiv.org/abs/2008.00401"),m(Va,"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(co,"class","relative group"),m(Ei,"href","/docs/transformers/main/en/model_doc/mbart#transformers.MBart50Tokenizer"),m(Oo,"id","documentation-resources"),m(Oo,"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(Oo,"href","#documentation-resources"),m(po,"class","relative group"),m(Ii,"href","../tasks/sequence_classification"),m(Zi,"href","../tasks/question_answering"),m(Gi,"href","../tasks/language_modeling"),m(Wi,"href","../tasks/masked_language_modeling"),m(Ni,"href","../tasks/translation"),m(Ri,"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(uo,"class","relative group"),m(Xi,"href","/docs/transformers/main/en/model_doc/mbart#transformers.MBartModel"),m(Ha,"href","https://huggingface.co/facebook/mbart-large-cc25"),m(Ha,"rel","nofollow"),m(Vi,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),m(Si,"href","/docs/transformers/main/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(fo,"class","relative group"),m(Ai,"href","/docs/transformers/main/en/model_doc/roberta#transformers.RobertaTokenizer"),m(Yi,"href","/docs/transformers/main/en/model_doc/xlnet#transformers.XLNetTokenizer"),m(es,"href","https://github.com/google/sentencepiece"),m(es,"rel","nofollow"),m(ud,"code",""),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(je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(on,"id","transformers.MBartTokenizerFast"),m(on,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(on,"href","#transformers.MBartTokenizerFast"),m(go,"class","relative group"),m(ls,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=BPE#models"),m(ls,"rel","nofollow"),m(Qi,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),m(wd,"code",""),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(sn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(rn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(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($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(dn,"id","transformers.MBart50Tokenizer"),m(dn,"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(dn,"href","#transformers.MBart50Tokenizer"),m(yo,"class","relative group"),m(Ts,"href","https://github.com/google/sentencepiece"),m(Ts,"rel","nofollow"),m(Pi,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),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(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(un,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(hn,"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(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(fn,"id","transformers.MBart50TokenizerFast"),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.MBart50TokenizerFast"),m(bo,"class","relative group"),m(qs,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=BPE#models"),m(qs,"rel","nofollow"),m(Oi,"href","/docs/transformers/main/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(_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(yn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(bn,"id","transformers.MBartModel"),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.MBartModel"),m(To,"class","relative group"),m(Di,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),m(Ps,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Ps,"rel","nofollow"),m(Hi,"href","/docs/transformers/main/en/model_doc/mbart#transformers.MBartModel"),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(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(kn,"id","transformers.MBartForConditionalGeneration"),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.MBartForConditionalGeneration"),m(vo,"class","relative group"),m(Li,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),m(er,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(er,"rel","nofollow"),m(Ki,"href","/docs/transformers/main/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(Fn,"id","transformers.MBartForQuestionAnswering"),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.MBartForQuestionAnswering"),m(Jo,"class","relative group"),m(el,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),m(rr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(rr,"rel","nofollow"),m(tl,"href","/docs/transformers/main/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(jn,"id","transformers.MBartForSequenceClassification"),m(jn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(jn,"href","#transformers.MBartForSequenceClassification"),m(zo,"class","relative group"),m(ol,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),m(ur,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(ur,"rel","nofollow"),m(nl,"href","/docs/transformers/main/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(Be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(En,"id","transformers.MBartForCausalLM"),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.MBartForCausalLM"),m($o,"class","relative group"),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(xo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(In,"id","transformers.TFMBartModel"),m(In,"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(In,"href","#transformers.TFMBartModel"),m(Bo,"class","relative group"),m(al,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),m(Tr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Tr,"rel","nofollow"),m(sl,"href","/docs/transformers/main/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(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(Nn,"id","transformers.TFMBartForConditionalGeneration"),m(Nn,"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(Nn,"href","#transformers.TFMBartForConditionalGeneration"),m(Co,"class","relative group"),m(rl,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),m(Ur,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(Ur,"rel","nofollow"),m(il,"href","/docs/transformers/main/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(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(An,"id","transformers.FlaxMBartModel"),m(An,"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(An,"href","#transformers.FlaxMBartModel"),m(Io,"class","relative group"),m(ll,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Er,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(Er,"rel","nofollow"),m(Cr,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(Cr,"rel","nofollow"),m(qr,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(qr,"rel","nofollow"),m(Ir,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(Ir,"rel","nofollow"),m(Zr,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(Zr,"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(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(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(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ln,"id","transformers.FlaxMBartForConditionalGeneration"),m(Ln,"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(Ln,"href","#transformers.FlaxMBartForConditionalGeneration"),m(Go,"class","relative group"),m(dl,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(Ar,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(Ar,"rel","nofollow"),m(Yr,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(Yr,"rel","nofollow"),m(Qr,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(Qr,"rel","nofollow"),m(Pr,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(Pr,"rel","nofollow"),m(Or,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(Or,"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(oa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(aa,"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(ra,"id","transformers.FlaxMBartForSequenceClassification"),m(ra,"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(ra,"href","#transformers.FlaxMBartForSequenceClassification"),m(No,"class","relative group"),m(cl,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(ni,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(ni,"rel","nofollow"),m(ai,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(ai,"rel","nofollow"),m(si,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(si,"rel","nofollow"),m(ri,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(ri,"rel","nofollow"),m(ii,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(ii,"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(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(pa,"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(ha,"id","transformers.FlaxMBartForQuestionAnswering"),m(ha,"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(ha,"href","#transformers.FlaxMBartForQuestionAnswering"),m(Xo,"class","relative group"),m(pl,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),m(fi,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),m(fi,"rel","nofollow"),m(gi,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),m(gi,"rel","nofollow"),m(_i,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),m(_i,"rel","nofollow"),m(yi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),m(yi,"rel","nofollow"),m(bi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),m(bi,"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(ga,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ya,"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(o,g){e(document.head,d),_(o,b,g),_(o,f,g),e(f,h),e(h,y),k(n,y,null),e(f,u),e(f,j),e(j,yt),_(o,ot,g),_(o,A,g),e(A,qe),e(qe,ce),e(A,bt),e(A,K),e(K,Ie),_(o,pe,g),_(o,ae,g),e(ae,Ye),e(Ye,be),e(ae,Mt),e(ae,Me),e(Me,Te),e(ae,Tt),_(o,nt,g),_(o,Y,g),e(Y,ue),e(ue,Qe),k(se,Qe,null),e(Y,Z),e(Y,G),e(G,kt),_(o,he,g),_(o,me,g),e(me,vt),e(me,D),e(D,wt),e(me,Jt),_(o,V,g),_(o,Ze,g),e(Ze,ke),_(o,at,g),_(o,re,g),e(re,ve),e(re,we),e(we,Ft),e(re,ie),e(re,Je),e(Je,Fe),_(o,st,g),_(o,H,g),e(H,I),e(I,Pe),k(W,Pe,null),e(H,Ut),e(H,Oe),e(Oe,U),_(o,x,g),_(o,O,g),e(O,De),e(O,zt),e(zt,Kt),e(O,E),e(O,jt),e(jt,eo),e(O,to),e(O,$t),e($t,oo),e(O,le),e(O,de),e(de,no),e(O,ao),_(o,fe,g),_(o,ee,g),e(ee,so),e(ee,Ue),e(Ue,xt),e(xt,He),e(Ue,ro),e(ee,mm),e(ee,$l),e($l,fm),e(ee,gm),e(ee,xl),e(xl,_m),e(ee,ym),_(o,Ap,g),_(o,ji,g),e(ji,Bl),e(Bl,bm),_(o,Yp,g),k(Wa,o,g),_(o,Qp,g),_(o,$i,g),e($i,Na),e(Na,El),e(El,Mm),e(Na,Tm),e(Na,io),e(io,km),e(io,Cl),e(Cl,vm),e(io,wm),e(io,ql),e(ql,Jm),e(io,Fm),_(o,Pp,g),k(Ra,o,g),_(o,Op,g),_(o,lo,g),e(lo,Yo),e(Yo,Il),k(Xa,Il,null),e(lo,Um),e(lo,Zl),e(Zl,zm),_(o,Dp,g),_(o,Nt,g),e(Nt,jm),e(Nt,Va),e(Va,$m),e(Nt,xm),e(Nt,Gl),e(Gl,Bm),e(Nt,Em),_(o,Hp,g),_(o,xi,g),e(xi,Cm),_(o,Lp,g),_(o,Bi,g),e(Bi,Wl),e(Wl,qm),_(o,Kp,g),_(o,co,g),e(co,Qo),e(Qo,Nl),k(Sa,Nl,null),e(co,Im),e(co,Rl),e(Rl,Zm),_(o,eu,g),_(o,rt,g),e(rt,Gm),e(rt,Xl),e(Xl,Wm),e(rt,Nm),e(rt,Vl),e(Vl,Rm),e(rt,Xm),e(rt,Sl),e(Sl,Vm),e(rt,Sm),_(o,tu,g),_(o,Po,g),e(Po,Am),e(Po,Ei),e(Ei,Ym),e(Po,Qm),_(o,ou,g),_(o,Ci,g),e(Ci,Al),e(Al,Pm),_(o,nu,g),k(Aa,o,g),_(o,au,g),_(o,qi,g),e(qi,Ya),e(Ya,Yl),e(Yl,Om),e(Ya,Dm),e(Ya,ze),e(ze,Hm),e(ze,Ql),e(Ql,Lm),e(ze,Km),e(ze,Pl),e(Pl,ef),e(ze,tf),e(ze,Ol),e(Ol,of),e(ze,nf),e(ze,Dl),e(Dl,af),e(ze,sf),e(ze,Hl),e(Hl,rf),e(ze,lf),_(o,su,g),k(Qa,o,g),_(o,ru,g),_(o,po,g),e(po,Oo),e(Oo,Ll),k(Pa,Ll,null),e(po,df),e(po,Kl),e(Kl,cf),_(o,iu,g),_(o,ge,g),e(ge,ed),e(ed,Ii),e(Ii,pf),e(ge,uf),e(ge,td),e(td,Zi),e(Zi,hf),e(ge,mf),e(ge,od),e(od,Gi),e(Gi,ff),e(ge,gf),e(ge,nd),e(nd,Wi),e(Wi,_f),e(ge,yf),e(ge,ad),e(ad,Ni),e(Ni,bf),e(ge,Mf),e(ge,sd),e(sd,Ri),e(Ri,Tf),_(o,lu,g),_(o,uo,g),e(uo,Do),e(Do,rd),k(Oa,rd,null),e(uo,kf),e(uo,id),e(id,vf),_(o,du,g),_(o,Le,g),k(Da,Le,null),e(Le,wf),e(Le,ho),e(ho,Jf),e(ho,Xi),e(Xi,Ff),e(ho,Uf),e(ho,Ha),e(Ha,zf),e(ho,jf),e(Le,$f),e(Le,mo),e(mo,xf),e(mo,Vi),e(Vi,Bf),e(mo,Ef),e(mo,Si),e(Si,Cf),e(mo,qf),e(Le,If),k(Ho,Le,null),_(o,cu,g),_(o,fo,g),e(fo,Lo),e(Lo,ld),k(La,ld,null),e(fo,Zf),e(fo,dd),e(dd,Gf),_(o,pu,g),_(o,je,g),k(Ka,je,null),e(je,Wf),e(je,cd),e(cd,Nf),e(je,Rf),e(je,Bt),e(Bt,Xf),e(Bt,Ai),e(Ai,Vf),e(Bt,Sf),e(Bt,Yi),e(Yi,Af),e(Bt,Yf),e(Bt,es),e(es,Qf),e(Bt,Pf),e(je,Of),e(je,Ko),e(Ko,Df),e(Ko,pd),e(pd,Hf),e(Ko,Lf),e(Ko,ud),e(je,Kf),e(je,hd),e(hd,en),e(en,eg),k(tn,en,null),e(en,tg),e(en,it),k(ts,it,null),e(it,og),e(it,os),e(os,ng),e(os,md),e(md,ag),e(os,sg),e(it,rg),e(it,ns),e(ns,as),e(as,fd),e(fd,ig),e(as,lg),e(as,gd),e(gd,dg),e(ns,cg),e(ns,ss),e(ss,_d),e(_d,pg),e(ss,ug),e(ss,yd),e(yd,hg),e(it,mg),e(it,bd),e(bd,fg),_(o,uu,g),_(o,go,g),e(go,on),e(on,Md),k(rs,Md,null),e(go,gg),e(go,Td),e(Td,_g),_(o,hu,g),_(o,$e,g),k(is,$e,null),e($e,yg),e($e,_o),e(_o,bg),e(_o,kd),e(kd,Mg),e(_o,Tg),e(_o,ls),e(ls,kg),e(_o,vg),e($e,wg),e($e,ds),e(ds,Jg),e(ds,Qi),e(Qi,Fg),e(ds,Ug),e($e,zg),e($e,nn),e(nn,jg),e(nn,vd),e(vd,$g),e(nn,xg),e(nn,wd),e($e,Bg),e($e,Jd),e(Jd,Ge),e(Ge,Eg),k(an,Ge,null),e(Ge,Cg),e(Ge,We),k(cs,We,null),e(We,qg),e(We,Fd),e(Fd,Ig),e(We,Zg),e(We,ps),e(ps,Gg),e(ps,Ud),e(Ud,Wg),e(ps,Ng),e(We,Rg),e(We,us),e(us,hs),e(hs,zd),e(zd,Xg),e(hs,Vg),e(hs,jd),e(jd,Sg),e(us,Ag),e(us,ms),e(ms,$d),e($d,Yg),e(ms,Qg),e(ms,xd),e(xd,Pg),e(We,Og),e(We,Bd),e(Bd,Dg),e(Ge,Hg),e(Ge,sn),k(fs,sn,null),e(sn,Lg),e(sn,Ed),e(Ed,Kg),e(Ge,e_),e(Ge,rn),k(gs,rn,null),e(rn,t_),e(rn,Cd),e(Cd,o_),e(Ge,n_),e(Ge,ln),k(_s,ln,null),e(ln,a_),e(ln,qd),e(qd,s_),_(o,mu,g),_(o,yo,g),e(yo,dn),e(dn,Id),k(ys,Id,null),e(yo,r_),e(yo,Zd),e(Zd,i_),_(o,fu,g),_(o,N,g),k(bs,N,null),e(N,l_),e(N,Ms),e(Ms,d_),e(Ms,Ts),e(Ts,c_),e(Ms,p_),e(N,u_),e(N,ks),e(ks,h_),e(ks,Pi),e(Pi,m_),e(ks,f_),e(N,g_),k(cn,N,null),e(N,__),e(N,lt),k(vs,lt,null),e(lt,y_),e(lt,ws),e(ws,b_),e(ws,Gd),e(Gd,M_),e(ws,T_),e(lt,k_),e(lt,Js),e(Js,Fs),e(Fs,Wd),e(Wd,v_),e(Fs,w_),e(Fs,Nd),e(Nd,J_),e(Js,F_),e(Js,Us),e(Us,Rd),e(Rd,U_),e(Us,z_),e(Us,Xd),e(Xd,j_),e(lt,$_),e(lt,Vd),e(Vd,x_),e(N,B_),e(N,pn),k(zs,pn,null),e(pn,E_),e(pn,Sd),e(Sd,C_),e(N,q_),e(N,un),k(js,un,null),e(un,I_),e(un,$s),e($s,Z_),e($s,Ad),e(Ad,G_),e($s,W_),e(N,N_),e(N,hn),k(xs,hn,null),e(hn,R_),e(hn,Yd),e(Yd,X_),e(N,V_),e(N,mn),k(Bs,mn,null),e(mn,S_),e(mn,Qd),e(Qd,A_),_(o,gu,g),_(o,bo,g),e(bo,fn),e(fn,Pd),k(Es,Pd,null),e(bo,Y_),e(bo,Od),e(Od,Q_),_(o,_u,g),_(o,L,g),k(Cs,L,null),e(L,P_),e(L,Mo),e(Mo,O_),e(Mo,Dd),e(Dd,D_),e(Mo,H_),e(Mo,qs),e(qs,L_),e(Mo,K_),e(L,ey),e(L,Is),e(Is,ty),e(Is,Oi),e(Oi,oy),e(Is,ny),e(L,ay),k(gn,L,null),e(L,sy),e(L,Ne),k(Zs,Ne,null),e(Ne,ry),e(Ne,Hd),e(Hd,iy),e(Ne,ly),e(Ne,Gs),e(Gs,dy),e(Gs,Ld),e(Ld,cy),e(Gs,py),e(Ne,uy),e(Ne,Ws),e(Ws,Ns),e(Ns,Kd),e(Kd,hy),e(Ns,my),e(Ns,ec),e(ec,fy),e(Ws,gy),e(Ws,Rs),e(Rs,tc),e(tc,_y),e(Rs,yy),e(Rs,oc),e(oc,by),e(Ne,My),e(Ne,nc),e(nc,Ty),e(L,ky),e(L,_n),k(Xs,_n,null),e(_n,vy),e(_n,ac),e(ac,wy),e(L,Jy),e(L,yn),k(Vs,yn,null),e(yn,Fy),e(yn,sc),e(sc,Uy),_(o,yu,g),_(o,To,g),e(To,bn),e(bn,rc),k(Ss,rc,null),e(To,zy),e(To,ic),e(ic,jy),_(o,bu,g),_(o,Ke,g),k(As,Ke,null),e(Ke,$y),e(Ke,Ys),e(Ys,xy),e(Ys,Di),e(Di,By),e(Ys,Ey),e(Ke,Cy),e(Ke,Qs),e(Qs,qy),e(Qs,Ps),e(Ps,Iy),e(Qs,Zy),e(Ke,Gy),e(Ke,dt),k(Os,dt,null),e(dt,Wy),e(dt,ko),e(ko,Ny),e(ko,Hi),e(Hi,Ry),e(ko,Xy),e(ko,lc),e(lc,Vy),e(ko,Sy),e(dt,Ay),k(Mn,dt,null),e(dt,Yy),k(Tn,dt,null),_(o,Mu,g),_(o,vo,g),e(vo,kn),e(kn,dc),k(Ds,dc,null),e(vo,Qy),e(vo,cc),e(cc,Py),_(o,Tu,g),_(o,et,g),k(Hs,et,null),e(et,Oy),e(et,Ls),e(Ls,Dy),e(Ls,Li),e(Li,Hy),e(Ls,Ly),e(et,Ky),e(et,Ks),e(Ks,eb),e(Ks,er),e(er,tb),e(Ks,ob),e(et,nb),e(et,Re),k(tr,Re,null),e(Re,ab),e(Re,wo),e(wo,sb),e(wo,Ki),e(Ki,rb),e(wo,ib),e(wo,pc),e(pc,lb),e(wo,db),e(Re,cb),k(vn,Re,null),e(Re,pb),k(wn,Re,null),e(Re,ub),k(Jn,Re,null),_(o,ku,g),_(o,Jo,g),e(Jo,Fn),e(Fn,uc),k(or,uc,null),e(Jo,hb),e(Jo,hc),e(hc,mb),_(o,vu,g),_(o,xe,g),k(nr,xe,null),e(xe,fb),e(xe,Fo),e(Fo,gb),e(Fo,mc),e(mc,_b),e(Fo,yb),e(Fo,fc),e(fc,bb),e(Fo,Mb),e(xe,Tb),e(xe,ar),e(ar,kb),e(ar,el),e(el,vb),e(ar,wb),e(xe,Jb),e(xe,sr),e(sr,Fb),e(sr,rr),e(rr,Ub),e(sr,zb),e(xe,jb),e(xe,ct),k(ir,ct,null),e(ct,$b),e(ct,Uo),e(Uo,xb),e(Uo,tl),e(tl,Bb),e(Uo,Eb),e(Uo,gc),e(gc,Cb),e(Uo,qb),e(ct,Ib),k(Un,ct,null),e(ct,Zb),k(zn,ct,null),_(o,wu,g),_(o,zo,g),e(zo,jn),e(jn,_c),k(lr,_c,null),e(zo,Gb),e(zo,yc),e(yc,Wb),_(o,Ju,g),_(o,Be,g),k(dr,Be,null),e(Be,Nb),e(Be,bc),e(bc,Rb),e(Be,Xb),e(Be,cr),e(cr,Vb),e(cr,ol),e(ol,Sb),e(cr,Ab),e(Be,Yb),e(Be,pr),e(pr,Qb),e(pr,ur),e(ur,Pb),e(pr,Ob),e(Be,Db),e(Be,Xe),k(hr,Xe,null),e(Xe,Hb),e(Xe,jo),e(jo,Lb),e(jo,nl),e(nl,Kb),e(jo,eM),e(jo,Mc),e(Mc,tM),e(jo,oM),e(Xe,nM),k($n,Xe,null),e(Xe,aM),k(xn,Xe,null),e(Xe,sM),k(Bn,Xe,null),_(o,Fu,g),_(o,$o,g),e($o,En),e(En,Tc),k(mr,Tc,null),e($o,rM),e($o,kc),e(kc,iM),_(o,Uu,g),_(o,xo,g),k(fr,xo,null),e(xo,lM),e(xo,Cn),k(gr,Cn,null),e(Cn,dM),k(qn,Cn,null),_(o,zu,g),_(o,Bo,g),e(Bo,In),e(In,vc),k(_r,vc,null),e(Bo,cM),e(Bo,wc),e(wc,pM),_(o,ju,g),_(o,Ee,g),k(yr,Ee,null),e(Ee,uM),e(Ee,br),e(br,hM),e(br,al),e(al,mM),e(br,fM),e(Ee,gM),e(Ee,Mr),e(Mr,_M),e(Mr,Tr),e(Tr,yM),e(Mr,bM),e(Ee,MM),k(Zn,Ee,null),e(Ee,TM),e(Ee,pt),k(kr,pt,null),e(pt,kM),e(pt,Eo),e(Eo,vM),e(Eo,sl),e(sl,wM),e(Eo,JM),e(Eo,Jc),e(Jc,FM),e(Eo,UM),e(pt,zM),k(Gn,pt,null),e(pt,jM),k(Wn,pt,null),_(o,$u,g),_(o,Co,g),e(Co,Nn),e(Nn,Fc),k(vr,Fc,null),e(Co,$M),e(Co,Uc),e(Uc,xM),_(o,xu,g),_(o,Ce,g),k(wr,Ce,null),e(Ce,BM),e(Ce,Jr),e(Jr,EM),e(Jr,rl),e(rl,CM),e(Jr,qM),e(Ce,IM),e(Ce,Fr),e(Fr,ZM),e(Fr,Ur),e(Ur,GM),e(Fr,WM),e(Ce,NM),k(Rn,Ce,null),e(Ce,RM),e(Ce,Ve),k(zr,Ve,null),e(Ve,XM),e(Ve,qo),e(qo,VM),e(qo,il),e(il,SM),e(qo,AM),e(qo,zc),e(zc,YM),e(qo,QM),e(Ve,PM),k(Xn,Ve,null),e(Ve,OM),k(Vn,Ve,null),e(Ve,DM),k(Sn,Ve,null),_(o,Bu,g),_(o,Io,g),e(Io,An),e(An,jc),k(jr,jc,null),e(Io,HM),e(Io,$c),e($c,LM),_(o,Eu,g),_(o,Q,g),k($r,Q,null),e(Q,KM),e(Q,xr),e(xr,eT),e(xr,ll),e(ll,tT),e(xr,oT),e(Q,nT),e(Q,Br),e(Br,aT),e(Br,Er),e(Er,sT),e(Br,rT),e(Q,iT),e(Q,xc),e(xc,lT),e(Q,dT),e(Q,Et),e(Et,Bc),e(Bc,Cr),e(Cr,cT),e(Et,pT),e(Et,Ec),e(Ec,qr),e(qr,uT),e(Et,hT),e(Et,Cc),e(Cc,Ir),e(Ir,mT),e(Et,fT),e(Et,qc),e(qc,Zr),e(Zr,gT),e(Q,_T),e(Q,ut),k(Gr,ut,null),e(ut,yT),e(ut,Zo),e(Zo,bT),e(Zo,Ic),e(Ic,MT),e(Zo,TT),e(Zo,Zc),e(Zc,kT),e(Zo,vT),e(ut,wT),k(Yn,ut,null),e(ut,JT),k(Qn,ut,null),e(Q,FT),e(Q,Pn),k(Wr,Pn,null),e(Pn,UT),k(On,Pn,null),e(Q,zT),e(Q,Dn),k(Nr,Dn,null),e(Dn,jT),k(Hn,Dn,null),_(o,Cu,g),_(o,Go,g),e(Go,Ln),e(Ln,Gc),k(Rr,Gc,null),e(Go,$T),e(Go,Wc),e(Wc,xT),_(o,qu,g),_(o,P,g),k(Xr,P,null),e(P,BT),e(P,Vr),e(Vr,ET),e(Vr,dl),e(dl,CT),e(Vr,qT),e(P,IT),e(P,Sr),e(Sr,ZT),e(Sr,Ar),e(Ar,GT),e(Sr,WT),e(P,NT),e(P,Nc),e(Nc,RT),e(P,XT),e(P,Ct),e(Ct,Rc),e(Rc,Yr),e(Yr,VT),e(Ct,ST),e(Ct,Xc),e(Xc,Qr),e(Qr,AT),e(Ct,YT),e(Ct,Vc),e(Vc,Pr),e(Pr,QT),e(Ct,PT),e(Ct,Sc),e(Sc,Or),e(Or,OT),e(P,DT),e(P,Se),k(Dr,Se,null),e(Se,HT),e(Se,Wo),e(Wo,LT),e(Wo,Ac),e(Ac,KT),e(Wo,ek),e(Wo,Yc),e(Yc,tk),e(Wo,ok),e(Se,nk),k(Kn,Se,null),e(Se,ak),k(ea,Se,null),e(Se,sk),k(ta,Se,null),e(P,rk),e(P,oa),k(Hr,oa,null),e(oa,ik),k(na,oa,null),e(P,lk),e(P,aa),k(Lr,aa,null),e(aa,dk),k(sa,aa,null),_(o,Iu,g),_(o,No,g),e(No,ra),e(ra,Qc),k(Kr,Qc,null),e(No,ck),e(No,Pc),e(Pc,pk),_(o,Zu,g),_(o,R,g),k(ei,R,null),e(R,uk),e(R,Oc),e(Oc,hk),e(R,mk),e(R,ti),e(ti,fk),e(ti,cl),e(cl,gk),e(ti,_k),e(R,yk),e(R,oi),e(oi,bk),e(oi,ni),e(ni,Mk),e(oi,Tk),e(R,kk),e(R,Dc),e(Dc,vk),e(R,wk),e(R,qt),e(qt,Hc),e(Hc,ai),e(ai,Jk),e(qt,Fk),e(qt,Lc),e(Lc,si),e(si,Uk),e(qt,zk),e(qt,Kc),e(Kc,ri),e(ri,jk),e(qt,$k),e(qt,ep),e(ep,ii),e(ii,xk),e(R,Bk),e(R,ht),k(li,ht,null),e(ht,Ek),e(ht,Ro),e(Ro,Ck),e(Ro,tp),e(tp,qk),e(Ro,Ik),e(Ro,op),e(op,Zk),e(Ro,Gk),e(ht,Wk),k(ia,ht,null),e(ht,Nk),k(la,ht,null),e(R,Rk),e(R,da),k(di,da,null),e(da,Xk),k(ca,da,null),e(R,Vk),e(R,pa),k(ci,pa,null),e(pa,Sk),k(ua,pa,null),_(o,Gu,g),_(o,Xo,g),e(Xo,ha),e(ha,np),k(pi,np,null),e(Xo,Ak),e(Xo,ap),e(ap,Yk),_(o,Wu,g),_(o,X,g),k(ui,X,null),e(X,Qk),e(X,Vo),e(Vo,Pk),e(Vo,sp),e(sp,Ok),e(Vo,Dk),e(Vo,rp),e(rp,Hk),e(Vo,Lk),e(X,Kk),e(X,hi),e(hi,ev),e(hi,pl),e(pl,tv),e(hi,ov),e(X,nv),e(X,mi),e(mi,av),e(mi,fi),e(fi,sv),e(mi,rv),e(X,iv),e(X,ip),e(ip,lv),e(X,dv),e(X,It),e(It,lp),e(lp,gi),e(gi,cv),e(It,pv),e(It,dp),e(dp,_i),e(_i,uv),e(It,hv),e(It,cp),e(cp,yi),e(yi,mv),e(It,fv),e(It,pp),e(pp,bi),e(bi,gv),e(X,_v),e(X,mt),k(Mi,mt,null),e(mt,yv),e(mt,So),e(So,bv),e(So,up),e(up,Mv),e(So,Tv),e(So,hp),e(hp,kv),e(So,vv),e(mt,wv),k(ma,mt,null),e(mt,Jv),k(fa,mt,null),e(X,Fv),e(X,ga),k(Ti,ga,null),e(ga,Uv),k(_a,ga,null),e(X,zv),e(X,ya),k(ki,ya,null),e(ya,jv),k(ba,ya,null),Nu=!0},p(o,[g]){const vi={};g&2&&(vi.$$scope={dirty:g,ctx:o}),Ho.$set(vi);const mp={};g&2&&(mp.$$scope={dirty:g,ctx:o}),tn.$set(mp);const fp={};g&2&&(fp.$$scope={dirty:g,ctx:o}),an.$set(fp);const gp={};g&2&&(gp.$$scope={dirty:g,ctx:o}),cn.$set(gp);const wi={};g&2&&(wi.$$scope={dirty:g,ctx:o}),gn.$set(wi);const _p={};g&2&&(_p.$$scope={dirty:g,ctx:o}),Mn.$set(_p);const yp={};g&2&&(yp.$$scope={dirty:g,ctx:o}),Tn.$set(yp);const Ma={};g&2&&(Ma.$$scope={dirty:g,ctx:o}),vn.$set(Ma);const bp={};g&2&&(bp.$$scope={dirty:g,ctx:o}),wn.$set(bp);const Mp={};g&2&&(Mp.$$scope={dirty:g,ctx:o}),Jn.$set(Mp);const Ji={};g&2&&(Ji.$$scope={dirty:g,ctx:o}),Un.$set(Ji);const Tp={};g&2&&(Tp.$$scope={dirty:g,ctx:o}),zn.$set(Tp);const kp={};g&2&&(kp.$$scope={dirty:g,ctx:o}),$n.$set(kp);const vp={};g&2&&(vp.$$scope={dirty:g,ctx:o}),xn.$set(vp);const Fi={};g&2&&(Fi.$$scope={dirty:g,ctx:o}),Bn.$set(Fi);const wp={};g&2&&(wp.$$scope={dirty:g,ctx:o}),qn.$set(wp);const Jp={};g&2&&(Jp.$$scope={dirty:g,ctx:o}),Zn.$set(Jp);const Ta={};g&2&&(Ta.$$scope={dirty:g,ctx:o}),Gn.$set(Ta);const Fp={};g&2&&(Fp.$$scope={dirty:g,ctx:o}),Wn.$set(Fp);const Up={};g&2&&(Up.$$scope={dirty:g,ctx:o}),Rn.$set(Up);const Ui={};g&2&&(Ui.$$scope={dirty:g,ctx:o}),Xn.$set(Ui);const zp={};g&2&&(zp.$$scope={dirty:g,ctx:o}),Vn.$set(zp);const jp={};g&2&&(jp.$$scope={dirty:g,ctx:o}),Sn.$set(jp);const $p={};g&2&&($p.$$scope={dirty:g,ctx:o}),Yn.$set($p);const tt={};g&2&&(tt.$$scope={dirty:g,ctx:o}),Qn.$set(tt);const xp={};g&2&&(xp.$$scope={dirty:g,ctx:o}),On.$set(xp);const Bp={};g&2&&(Bp.$$scope={dirty:g,ctx:o}),Hn.$set(Bp);const Ep={};g&2&&(Ep.$$scope={dirty:g,ctx:o}),Kn.$set(Ep);const Cp={};g&2&&(Cp.$$scope={dirty:g,ctx:o}),ea.$set(Cp);const Zt={};g&2&&(Zt.$$scope={dirty:g,ctx:o}),ta.$set(Zt);const ul={};g&2&&(ul.$$scope={dirty:g,ctx:o}),na.$set(ul);const qp={};g&2&&(qp.$$scope={dirty:g,ctx:o}),sa.$set(qp);const Ip={};g&2&&(Ip.$$scope={dirty:g,ctx:o}),ia.$set(Ip);const Zp={};g&2&&(Zp.$$scope={dirty:g,ctx:o}),la.$set(Zp);const Gp={};g&2&&(Gp.$$scope={dirty:g,ctx:o}),ca.$set(Gp);const Wp={};g&2&&(Wp.$$scope={dirty:g,ctx:o}),ua.$set(Wp);const Np={};g&2&&(Np.$$scope={dirty:g,ctx:o}),ma.$set(Np);const zi={};g&2&&(zi.$$scope={dirty:g,ctx:o}),fa.$set(zi);const Rp={};g&2&&(Rp.$$scope={dirty:g,ctx:o}),_a.$set(Rp);const Ao={};g&2&&(Ao.$$scope={dirty:g,ctx:o}),ba.$set(Ao)},i(o){Nu||(v(n.$$.fragment,o),v(se.$$.fragment,o),v(W.$$.fragment,o),v(Wa.$$.fragment,o),v(Ra.$$.fragment,o),v(Xa.$$.fragment,o),v(Sa.$$.fragment,o),v(Aa.$$.fragment,o),v(Qa.$$.fragment,o),v(Pa.$$.fragment,o),v(Oa.$$.fragment,o),v(Da.$$.fragment,o),v(Ho.$$.fragment,o),v(La.$$.fragment,o),v(Ka.$$.fragment,o),v(tn.$$.fragment,o),v(ts.$$.fragment,o),v(rs.$$.fragment,o),v(is.$$.fragment,o),v(an.$$.fragment,o),v(cs.$$.fragment,o),v(fs.$$.fragment,o),v(gs.$$.fragment,o),v(_s.$$.fragment,o),v(ys.$$.fragment,o),v(bs.$$.fragment,o),v(cn.$$.fragment,o),v(vs.$$.fragment,o),v(zs.$$.fragment,o),v(js.$$.fragment,o),v(xs.$$.fragment,o),v(Bs.$$.fragment,o),v(Es.$$.fragment,o),v(Cs.$$.fragment,o),v(gn.$$.fragment,o),v(Zs.$$.fragment,o),v(Xs.$$.fragment,o),v(Vs.$$.fragment,o),v(Ss.$$.fragment,o),v(As.$$.fragment,o),v(Os.$$.fragment,o),v(Mn.$$.fragment,o),v(Tn.$$.fragment,o),v(Ds.$$.fragment,o),v(Hs.$$.fragment,o),v(tr.$$.fragment,o),v(vn.$$.fragment,o),v(wn.$$.fragment,o),v(Jn.$$.fragment,o),v(or.$$.fragment,o),v(nr.$$.fragment,o),v(ir.$$.fragment,o),v(Un.$$.fragment,o),v(zn.$$.fragment,o),v(lr.$$.fragment,o),v(dr.$$.fragment,o),v(hr.$$.fragment,o),v($n.$$.fragment,o),v(xn.$$.fragment,o),v(Bn.$$.fragment,o),v(mr.$$.fragment,o),v(fr.$$.fragment,o),v(gr.$$.fragment,o),v(qn.$$.fragment,o),v(_r.$$.fragment,o),v(yr.$$.fragment,o),v(Zn.$$.fragment,o),v(kr.$$.fragment,o),v(Gn.$$.fragment,o),v(Wn.$$.fragment,o),v(vr.$$.fragment,o),v(wr.$$.fragment,o),v(Rn.$$.fragment,o),v(zr.$$.fragment,o),v(Xn.$$.fragment,o),v(Vn.$$.fragment,o),v(Sn.$$.fragment,o),v(jr.$$.fragment,o),v($r.$$.fragment,o),v(Gr.$$.fragment,o),v(Yn.$$.fragment,o),v(Qn.$$.fragment,o),v(Wr.$$.fragment,o),v(On.$$.fragment,o),v(Nr.$$.fragment,o),v(Hn.$$.fragment,o),v(Rr.$$.fragment,o),v(Xr.$$.fragment,o),v(Dr.$$.fragment,o),v(Kn.$$.fragment,o),v(ea.$$.fragment,o),v(ta.$$.fragment,o),v(Hr.$$.fragment,o),v(na.$$.fragment,o),v(Lr.$$.fragment,o),v(sa.$$.fragment,o),v(Kr.$$.fragment,o),v(ei.$$.fragment,o),v(li.$$.fragment,o),v(ia.$$.fragment,o),v(la.$$.fragment,o),v(di.$$.fragment,o),v(ca.$$.fragment,o),v(ci.$$.fragment,o),v(ua.$$.fragment,o),v(pi.$$.fragment,o),v(ui.$$.fragment,o),v(Mi.$$.fragment,o),v(ma.$$.fragment,o),v(fa.$$.fragment,o),v(Ti.$$.fragment,o),v(_a.$$.fragment,o),v(ki.$$.fragment,o),v(ba.$$.fragment,o),Nu=!0)},o(o){w(n.$$.fragment,o),w(se.$$.fragment,o),w(W.$$.fragment,o),w(Wa.$$.fragment,o),w(Ra.$$.fragment,o),w(Xa.$$.fragment,o),w(Sa.$$.fragment,o),w(Aa.$$.fragment,o),w(Qa.$$.fragment,o),w(Pa.$$.fragment,o),w(Oa.$$.fragment,o),w(Da.$$.fragment,o),w(Ho.$$.fragment,o),w(La.$$.fragment,o),w(Ka.$$.fragment,o),w(tn.$$.fragment,o),w(ts.$$.fragment,o),w(rs.$$.fragment,o),w(is.$$.fragment,o),w(an.$$.fragment,o),w(cs.$$.fragment,o),w(fs.$$.fragment,o),w(gs.$$.fragment,o),w(_s.$$.fragment,o),w(ys.$$.fragment,o),w(bs.$$.fragment,o),w(cn.$$.fragment,o),w(vs.$$.fragment,o),w(zs.$$.fragment,o),w(js.$$.fragment,o),w(xs.$$.fragment,o),w(Bs.$$.fragment,o),w(Es.$$.fragment,o),w(Cs.$$.fragment,o),w(gn.$$.fragment,o),w(Zs.$$.fragment,o),w(Xs.$$.fragment,o),w(Vs.$$.fragment,o),w(Ss.$$.fragment,o),w(As.$$.fragment,o),w(Os.$$.fragment,o),w(Mn.$$.fragment,o),w(Tn.$$.fragment,o),w(Ds.$$.fragment,o),w(Hs.$$.fragment,o),w(tr.$$.fragment,o),w(vn.$$.fragment,o),w(wn.$$.fragment,o),w(Jn.$$.fragment,o),w(or.$$.fragment,o),w(nr.$$.fragment,o),w(ir.$$.fragment,o),w(Un.$$.fragment,o),w(zn.$$.fragment,o),w(lr.$$.fragment,o),w(dr.$$.fragment,o),w(hr.$$.fragment,o),w($n.$$.fragment,o),w(xn.$$.fragment,o),w(Bn.$$.fragment,o),w(mr.$$.fragment,o),w(fr.$$.fragment,o),w(gr.$$.fragment,o),w(qn.$$.fragment,o),w(_r.$$.fragment,o),w(yr.$$.fragment,o),w(Zn.$$.fragment,o),w(kr.$$.fragment,o),w(Gn.$$.fragment,o),w(Wn.$$.fragment,o),w(vr.$$.fragment,o),w(wr.$$.fragment,o),w(Rn.$$.fragment,o),w(zr.$$.fragment,o),w(Xn.$$.fragment,o),w(Vn.$$.fragment,o),w(Sn.$$.fragment,o),w(jr.$$.fragment,o),w($r.$$.fragment,o),w(Gr.$$.fragment,o),w(Yn.$$.fragment,o),w(Qn.$$.fragment,o),w(Wr.$$.fragment,o),w(On.$$.fragment,o),w(Nr.$$.fragment,o),w(Hn.$$.fragment,o),w(Rr.$$.fragment,o),w(Xr.$$.fragment,o),w(Dr.$$.fragment,o),w(Kn.$$.fragment,o),w(ea.$$.fragment,o),w(ta.$$.fragment,o),w(Hr.$$.fragment,o),w(na.$$.fragment,o),w(Lr.$$.fragment,o),w(sa.$$.fragment,o),w(Kr.$$.fragment,o),w(ei.$$.fragment,o),w(li.$$.fragment,o),w(ia.$$.fragment,o),w(la.$$.fragment,o),w(di.$$.fragment,o),w(ca.$$.fragment,o),w(ci.$$.fragment,o),w(ua.$$.fragment,o),w(pi.$$.fragment,o),w(ui.$$.fragment,o),w(Mi.$$.fragment,o),w(ma.$$.fragment,o),w(fa.$$.fragment,o),w(Ti.$$.fragment,o),w(_a.$$.fragment,o),w(ki.$$.fragment,o),w(ba.$$.fragment,o),Nu=!1},d(o){t(d),o&&t(b),o&&t(f),J(n),o&&t(ot),o&&t(A),o&&t(pe),o&&t(ae),o&&t(nt),o&&t(Y),J(se),o&&t(he),o&&t(me),o&&t(V),o&&t(Ze),o&&t(at),o&&t(re),o&&t(st),o&&t(H),J(W),o&&t(x),o&&t(O),o&&t(fe),o&&t(ee),o&&t(Ap),o&&t(ji),o&&t(Yp),J(Wa,o),o&&t(Qp),o&&t($i),o&&t(Pp),J(Ra,o),o&&t(Op),o&&t(lo),J(Xa),o&&t(Dp),o&&t(Nt),o&&t(Hp),o&&t(xi),o&&t(Lp),o&&t(Bi),o&&t(Kp),o&&t(co),J(Sa),o&&t(eu),o&&t(rt),o&&t(tu),o&&t(Po),o&&t(ou),o&&t(Ci),o&&t(nu),J(Aa,o),o&&t(au),o&&t(qi),o&&t(su),J(Qa,o),o&&t(ru),o&&t(po),J(Pa),o&&t(iu),o&&t(ge),o&&t(lu),o&&t(uo),J(Oa),o&&t(du),o&&t(Le),J(Da),J(Ho),o&&t(cu),o&&t(fo),J(La),o&&t(pu),o&&t(je),J(Ka),J(tn),J(ts),o&&t(uu),o&&t(go),J(rs),o&&t(hu),o&&t($e),J(is),J(an),J(cs),J(fs),J(gs),J(_s),o&&t(mu),o&&t(yo),J(ys),o&&t(fu),o&&t(N),J(bs),J(cn),J(vs),J(zs),J(js),J(xs),J(Bs),o&&t(gu),o&&t(bo),J(Es),o&&t(_u),o&&t(L),J(Cs),J(gn),J(Zs),J(Xs),J(Vs),o&&t(yu),o&&t(To),J(Ss),o&&t(bu),o&&t(Ke),J(As),J(Os),J(Mn),J(Tn),o&&t(Mu),o&&t(vo),J(Ds),o&&t(Tu),o&&t(et),J(Hs),J(tr),J(vn),J(wn),J(Jn),o&&t(ku),o&&t(Jo),J(or),o&&t(vu),o&&t(xe),J(nr),J(ir),J(Un),J(zn),o&&t(wu),o&&t(zo),J(lr),o&&t(Ju),o&&t(Be),J(dr),J(hr),J($n),J(xn),J(Bn),o&&t(Fu),o&&t($o),J(mr),o&&t(Uu),o&&t(xo),J(fr),J(gr),J(qn),o&&t(zu),o&&t(Bo),J(_r),o&&t(ju),o&&t(Ee),J(yr),J(Zn),J(kr),J(Gn),J(Wn),o&&t($u),o&&t(Co),J(vr),o&&t(xu),o&&t(Ce),J(wr),J(Rn),J(zr),J(Xn),J(Vn),J(Sn),o&&t(Bu),o&&t(Io),J(jr),o&&t(Eu),o&&t(Q),J($r),J(Gr),J(Yn),J(Qn),J(Wr),J(On),J(Nr),J(Hn),o&&t(Cu),o&&t(Go),J(Rr),o&&t(qu),o&&t(P),J(Xr),J(Dr),J(Kn),J(ea),J(ta),J(Hr),J(na),J(Lr),J(sa),o&&t(Iu),o&&t(No),J(Kr),o&&t(Zu),o&&t(R),J(ei),J(li),J(ia),J(la),J(di),J(ca),J(ci),J(ua),o&&t(Gu),o&&t(Xo),J(pi),o&&t(Wu),o&&t(X),J(ui),J(Mi),J(ma),J(fa),J(Ti),J(_a),J(ki),J(ba)}}}const EJ={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 CJ(F){return A0(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class RJ extends R0{constructor(d){super();X0(this,d,CJ,BJ,V0,{})}}export{RJ as default,EJ as metadata};
