import{S as Tl,i as bl,s as yl,e as n,k as h,w as y,t as r,M as Ml,c as s,d as o,m as p,a,x as M,h as i,b as l,N as _l,G as e,g,y as v,q as w,o as k,B as U,v as vl,L as Eo}from"../../chunks/vendor-hf-doc-builder.js";import{T as yn}from"../../chunks/Tip-hf-doc-builder.js";import{D as P}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Lt}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as L}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as xo}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function wl($){let c,b,_,f,T;return f=new Lt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFVNVDVNb2RlbCUyQyUyMEF1dG9Ub2tlbml6ZXIlMEElMEFtb2RlbCUyMCUzRCUyMFVNVDVNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGdW10NS1zbWFsbCUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZ1bXQ1LXNtYWxsJTIyKSUwQW5vaXN5X3RleHQlMjAlM0QlMjAlMjJVTiUyME9mZml6aWVyJTIwc2FndCUyQyUyMGRhc3MlMjB3ZWl0ZXIlMjAlM0NleHRyYV9pZF8wJTNFJTIwd2VyZGVuJTIwbXVzcyUyMGluJTIwU3lyaWVuLiUyMiUwQWxhYmVsJTIwJTNEJTIwJTIyJTNDZXh0cmFfaWRfMCUzRSUyMHZlcmhhbmRlbHQlMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoaW5wdXRzJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFsYWJlbHMlMjAlM0QlMjB0b2tlbml6ZXIobGFiZWwlM0RsYWJlbCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0X2lkcyUzRGlucHV0cyU1QiUyMmlucHV0X2lkcyUyMiU1RCUyQyUyMGRlY29kZXJfaW5wdXRfaWRzJTNEbGFiZWxzJTVCJTIyaW5wdXRfaWRzJTIyJTVEKSUwQWhpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> UMT5Model, AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>model = UMT5Model.from_pretrained(<span class="hljs-string">&quot;google/umt5-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/umt5-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>noisy_text = <span class="hljs-string">&quot;UN Offizier sagt, dass weiter &lt;extra_id_0&gt; werden muss in Syrien.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>label = <span class="hljs-string">&quot;&lt;extra_id_0&gt; verhandelt&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(inputs, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tokenizer(label=label, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(input_ids=inputs[<span class="hljs-string">&quot;input_ids&quot;</span>], decoder_input_ids=labels[<span class="hljs-string">&quot;input_ids&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>hidden_states = outputs.last_hidden_state`}}),{c(){c=n("p"),b=r("Examples:"),_=h(),y(f.$$.fragment)},l(d){c=s(d,"P",{});var u=a(c);b=i(u,"Examples:"),u.forEach(o),_=p(d),M(f.$$.fragment,d)},m(d,u){g(d,c,u),e(c,b),g(d,_,u),v(f,d,u),T=!0},p:Eo,i(d){T||(w(f.$$.fragment,d),T=!0)},o(d){k(f.$$.fragment,d),T=!1},d(d){d&&o(c),d&&o(_),U(f,d)}}}function kl($){let c,b,_,f,T;return{c(){c=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n("code"),f=r("Module"),T=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=s(d,"P",{});var u=a(c);b=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(u,"CODE",{});var z=a(_);f=i(z,"Module"),z.forEach(o),T=i(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(o)},m(d,u){g(d,c,u),e(c,b),e(c,_),e(_,f),e(c,T)},d(d){d&&o(c)}}}function Ul($){let c,b,_,f,T;return f=new Lt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBVTVQ1TW9kZWwlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZ1bXQ1LXNtYWxsJTIyKSUwQW1vZGVsJTIwJTNEJTIwVU1UNU1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZ1bXQ1LXNtYWxsJTIyKSUwQSUwQWlucHV0X2lkcyUyMCUzRCUyMHRva2VuaXplciglMEElMjAlMjAlMjAlMjAlMjJTdHVkaWVzJTIwaGF2ZSUyMGJlZW4lMjBzaG93biUyMHRoYXQlMjBvd25pbmclMjBhJTIwZG9nJTIwaXMlMjBnb29kJTIwZm9yJTIweW91JTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUwQSkuaW5wdXRfaWRzJTIwJTIwJTIzJTIwQmF0Y2glMjBzaXplJTIwMSUwQWRlY29kZXJfaW5wdXRfaWRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlN0dWRpZXMlMjBzaG93JTIwdGhhdCUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpLmlucHV0X2lkcyUyMCUyMCUyMyUyMEJhdGNoJTIwc2l6ZSUyMDElMEElMEElMjMlMjBwcmVwcm9jZXNzJTNBJTIwUHJlcGVuZCUyMGRlY29kZXJfaW5wdXRfaWRzJTIwd2l0aCUyMHN0YXJ0JTIwdG9rZW4lMjB3aGljaCUyMGlzJTIwcGFkJTIwdG9rZW4lMjBmb3IlMjBVTVQ1TW9kZWwuJTBBJTIzJTIwVGhpcyUyMGlzJTIwbm90JTIwbmVlZGVkJTIwZm9yJTIwdG9yY2gncyUyMFVNVDVGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMjBhcyUyMGl0JTIwZG9lcyUyMHRoaXMlMjBpbnRlcm5hbGx5JTIwdXNpbmclMjBsYWJlbHMlMjBhcmcuJTBBZGVjb2Rlcl9pbnB1dF9pZHMlMjAlM0QlMjBtb2RlbC5fc2hpZnRfcmlnaHQoZGVjb2Rlcl9pbnB1dF9pZHMpJTBBJTBBJTIzJTIwZm9yd2FyZCUyMHBhc3MlMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRfaWRzJTNEaW5wdXRfaWRzJTJDJTIwZGVjb2Rlcl9pbnB1dF9pZHMlM0RkZWNvZGVyX2lucHV0X2lkcyklMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, UMT5Model

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/umt5-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = UMT5Model.from_pretrained(<span class="hljs-string">&quot;google/umt5-small&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Studies have been shown that owning a dog is good for you&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>
<span class="hljs-meta">... </span>).input_ids  <span class="hljs-comment"># Batch size 1</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_input_ids = tokenizer(<span class="hljs-string">&quot;Studies show that&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).input_ids  <span class="hljs-comment"># Batch size 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># preprocess: Prepend decoder_input_ids with start token which is pad token for UMT5Model.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># This is not needed for torch&#x27;s UMT5ForConditionalGeneration as it does this internally using labels arg.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_input_ids = model._shift_right(decoder_input_ids)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># forward pass</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(input_ids=input_ids, decoder_input_ids=decoder_input_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){c=n("p"),b=r("Example:"),_=h(),y(f.$$.fragment)},l(d){c=s(d,"P",{});var u=a(c);b=i(u,"Example:"),u.forEach(o),_=p(d),M(f.$$.fragment,d)},m(d,u){g(d,c,u),e(c,b),g(d,_,u),v(f,d,u),T=!0},p:Eo,i(d){T||(w(f.$$.fragment,d),T=!0)},o(d){k(f.$$.fragment,d),T=!1},d(d){d&&o(c),d&&o(_),U(f,d)}}}function $l($){let c,b,_,f,T;return f=new Lt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFVNVDVGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMkMlMjBBdXRvVG9rZW5pemVyJTBBJTBBbW9kZWwlMjAlM0QlMjBVTVQ1Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZ1bXQ1LXNtYWxsJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnVtdDUtc21hbGwlMjIpJTBBYXJ0aWNsZSUyMCUzRCUyMCUyMlVOJTIwT2ZmaXppZXIlMjBzYWd0JTJDJTIwZGFzcyUyMHdlaXRlciUyMHZlcmhhbmRlbHQlMjB3ZXJkZW4lMjBtdXNzJTIwaW4lMjBTeXJpZW4uJTIyJTBBc3VtbWFyeSUyMCUzRCUyMCUyMldlaXRlciUyMFZlcmhhbmRsdW5nJTIwaW4lMjBTeXJpZW4uJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKGFydGljbGUlMkMlMjB0ZXh0X3RhcmdldCUzRHN1bW1hcnklMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3Nz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> UMT5ForConditionalGeneration, AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>model = UMT5ForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;google/umt5-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/umt5-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>article = <span class="hljs-string">&quot;UN Offizier sagt, dass weiter verhandelt werden muss in Syrien.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>summary = <span class="hljs-string">&quot;Weiter Verhandlung in Syrien.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(article, text_target=summary, 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>loss = outputs.loss`}}),{c(){c=n("p"),b=r("Examples:"),_=h(),y(f.$$.fragment)},l(d){c=s(d,"P",{});var u=a(c);b=i(u,"Examples:"),u.forEach(o),_=p(d),M(f.$$.fragment,d)},m(d,u){g(d,c,u),e(c,b),g(d,_,u),v(f,d,u),T=!0},p:Eo,i(d){T||(w(f.$$.fragment,d),T=!0)},o(d){k(f.$$.fragment,d),T=!1},d(d){d&&o(c),d&&o(_),U(f,d)}}}function zl($){let c,b,_,f,T;return{c(){c=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n("code"),f=r("Module"),T=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=s(d,"P",{});var u=a(c);b=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(u,"CODE",{});var z=a(_);f=i(z,"Module"),z.forEach(o),T=i(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(o)},m(d,u){g(d,c,u),e(c,b),e(c,_),e(_,f),e(c,T)},d(d){d&&o(c)}}}function Fl($){let c,b,_,f,T;return f=new Lt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBVTVQ1Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGdW10NS1zbWFsbCUyMiklMEFtb2RlbCUyMCUzRCUyMFVNVDVGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnVtdDUtc21hbGwlMjIpJTBBJTBBJTIzJTIwdHJhaW5pbmclMEFpbnB1dF9pZHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyVGhlJTIwJTNDZXh0cmFfaWRfMCUzRSUyMHdhbGtzJTIwaW4lMjAlM0NleHRyYV9pZF8xJTNFJTIwcGFyayUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpLmlucHV0X2lkcyUwQWxhYmVscyUyMCUzRCUyMHRva2VuaXplciglMjIlM0NleHRyYV9pZF8wJTNFJTIwY3V0ZSUyMGRvZyUyMCUzQ2V4dHJhX2lkXzElM0UlMjB0aGUlMjAlM0NleHRyYV9pZF8yJTNFJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMikuaW5wdXRfaWRzJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0X2lkcyUzRGlucHV0X2lkcyUyQyUyMGxhYmVscyUzRGxhYmVscyklMEFsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3NzJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHMlMEElMEElMjMlMjBpbmZlcmVuY2UlMEFpbnB1dF9pZHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyU3R1ZGllcyUyMGhhdmUlMjBzaG93biUyMHRoYXQlMjAlM0NleHRyYV9pZF8wJTNFJTIwZ29vZCUyMGZvciUyMHlvdSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpLmlucHV0X2lkcyUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZShpbnB1dF9pZHMpJTBBdG9rZW5pemVyLmRlY29kZShvdXRwdXRzJTVCMCU1RCUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, UMT5ForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/umt5-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = UMT5ForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;google/umt5-small&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># training</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer(<span class="hljs-string">&quot;The &lt;extra_id_0&gt; walks in &lt;extra_id_1&gt; park&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).input_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tokenizer(<span class="hljs-string">&quot;&lt;extra_id_0&gt; cute dog &lt;extra_id_1&gt; the &lt;extra_id_2&gt;&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).input_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(input_ids=input_ids, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># inference</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer(<span class="hljs-string">&quot;Studies have shown that &lt;extra_id_0&gt; good for you&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).input_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.generate(input_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(outputs[<span class="hljs-number">0</span>], skip_special_tokens=<span class="hljs-literal">True</span>)`}}),{c(){c=n("p"),b=r("Examples:"),_=h(),y(f.$$.fragment)},l(d){c=s(d,"P",{});var u=a(c);b=i(u,"Examples:"),u.forEach(o),_=p(d),M(f.$$.fragment,d)},m(d,u){g(d,c,u),e(c,b),g(d,_,u),v(f,d,u),T=!0},p:Eo,i(d){T||(w(f.$$.fragment,d),T=!0)},o(d){k(f.$$.fragment,d),T=!1},d(d){d&&o(c),d&&o(_),U(f,d)}}}function xl($){let c,b,_,f,T;return f=new Lt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFVNVDVFbmNvZGVyTW9kZWwlMkMlMjBBdXRvVG9rZW5pemVyJTBBJTBBbW9kZWwlMjAlM0QlMjBVTVQ1RW5jb2Rlck1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZ1bXQ1LXNtYWxsJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnVtdDUtc21hbGwlMjIpJTBBYXJ0aWNsZSUyMCUzRCUyMCUyMlVOJTIwT2ZmaXppZXIlMjBzYWd0JTJDJTIwZGFzcyUyMHdlaXRlciUyMHZlcmhhbmRlbHQlMjB3ZXJkZW4lMjBtdXNzJTIwaW4lMjBTeXJpZW4uJTIyJTBBaW5wdXRfaWRzJTIwJTNEJTIwdG9rZW5pemVyKGFydGljbGUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKS5pbnB1dF9pZHMlMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRfaWRzKSUwQWhpZGRlbl9zdGF0ZSUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> UMT5EncoderModel, AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>model = UMT5EncoderModel.from_pretrained(<span class="hljs-string">&quot;google/umt5-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/umt5-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>article = <span class="hljs-string">&quot;UN Offizier sagt, dass weiter verhandelt werden muss in Syrien.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer(article, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).input_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(input_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>hidden_state = outputs.last_hidden_state`}}),{c(){c=n("p"),b=r("Examples:"),_=h(),y(f.$$.fragment)},l(d){c=s(d,"P",{});var u=a(c);b=i(u,"Examples:"),u.forEach(o),_=p(d),M(f.$$.fragment,d)},m(d,u){g(d,c,u),e(c,b),g(d,_,u),v(f,d,u),T=!0},p:Eo,i(d){T||(w(f.$$.fragment,d),T=!0)},o(d){k(f.$$.fragment,d),T=!1},d(d){d&&o(c),d&&o(_),U(f,d)}}}function El($){let c,b,_,f,T;return{c(){c=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n("code"),f=r("Module"),T=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=s(d,"P",{});var u=a(c);b=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(u,"CODE",{});var z=a(_);f=i(z,"Module"),z.forEach(o),T=i(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(o)},m(d,u){g(d,c,u),e(c,b),e(c,_),e(_,f),e(c,T)},d(d){d&&o(c)}}}function ql($){let c,b,_,f,T;return f=new Lt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBVTVQ1RW5jb2Rlck1vZGVsJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGdW10NS1zbWFsbCUyMiklMEFtb2RlbCUyMCUzRCUyMFVNVDVFbmNvZGVyTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnVtdDUtc21hbGwlMjIpJTBBaW5wdXRfaWRzJTIwJTNEJTIwdG9rZW5pemVyKCUwQSUyMCUyMCUyMCUyMCUyMlN0dWRpZXMlMjBoYXZlJTIwYmVlbiUyMHNob3duJTIwdGhhdCUyMG93bmluZyUyMGElMjBkb2clMjBpcyUyMGdvb2QlMjBmb3IlMjB5b3UlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTBBKS5pbnB1dF9pZHMlMjAlMjAlMjMlMjBCYXRjaCUyMHNpemUlMjAxJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0X2lkcyUzRGlucHV0X2lkcyklMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, UMT5EncoderModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/umt5-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = UMT5EncoderModel.from_pretrained(<span class="hljs-string">&quot;google/umt5-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Studies have been shown that owning a dog is good for you&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>
<span class="hljs-meta">... </span>).input_ids  <span class="hljs-comment"># Batch size 1</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(input_ids=input_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){c=n("p"),b=r("Example:"),_=h(),y(f.$$.fragment)},l(d){c=s(d,"P",{});var u=a(c);b=i(u,"Example:"),u.forEach(o),_=p(d),M(f.$$.fragment,d)},m(d,u){g(d,c,u),e(c,b),g(d,_,u),v(f,d,u),T=!0},p:Eo,i(d){T||(w(f.$$.fragment,d),T=!0)},o(d){k(f.$$.fragment,d),T=!1},d(d){d&&o(c),d&&o(_),U(f,d)}}}function Cl($){let c,b,_,f,T;return{c(){c=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n("code"),f=r("Module"),T=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=s(d,"P",{});var u=a(c);b=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(u,"CODE",{});var z=a(_);f=i(z,"Module"),z.forEach(o),T=i(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(o)},m(d,u){g(d,c,u),e(c,b),e(c,_),e(_,f),e(c,T)},d(d){d&&o(c)}}}function Jl($){let c,b,_,f,T;return{c(){c=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n("code"),f=r("Module"),T=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=s(d,"P",{});var u=a(c);b=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(u,"CODE",{});var z=a(_);f=i(z,"Module"),z.forEach(o),T=i(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(o)},m(d,u){g(d,c,u),e(c,b),e(c,_),e(_,f),e(c,T)},d(d){d&&o(c)}}}function jl($){let c,b,_,f,T,d,u,z,vs,Mn,H,Ht,Ot,Xi,ws,Qt,Dt,Bi,vn,O,pe,qo,We,ks,Co,Us,wn,ue,$s,Re,zs,Fs,kn,Yt,xs,Un,Kt,Jo,Es,$n,eo,qs,zn,me,Ge,Cs,Ve,Js,js,Is,jo,Ss,Fn,to,Zs,xn,S,Io,Pe,As,Ns,So,Xe,Ws,Rs,Zo,Be,Gs,Vs,oo,Le,Ps,Xs,En,Z,Bs,He,Ls,Hs,Oe,Os,Qs,Qe,Ds,Ys,qn,fe,Ks,no,ea,ta,Cn,Q,ge,Ao,De,oa,No,na,Jn,D,_e,Wo,Ye,sa,Ro,aa,jn,Ke,In,Y,Te,Go,et,ra,Vo,ia,Sn,V,tt,da,K,la,so,ca,ha,ot,pa,ua,ma,ee,fa,ao,ga,_a,ro,Ta,ba,Zn,te,be,Po,nt,ya,Xo,Ma,An,F,st,va,Bo,wa,ka,at,Ua,rt,$a,za,Fa,it,xa,io,Ea,qa,Ca,dt,Ja,lt,ja,Ia,Sa,ye,Za,A,ct,Aa,oe,Na,lo,Wa,Ra,Lo,Ga,Va,Pa,Me,Xa,ve,Nn,ne,we,Ho,ht,Ba,Oo,La,Wn,x,pt,Ha,ut,Oa,Qo,Qa,Da,Ya,mt,Ka,ft,er,tr,or,gt,nr,co,sr,ar,rr,_t,ir,Tt,dr,lr,cr,ke,hr,N,bt,pr,se,ur,ho,mr,fr,Do,gr,_r,Tr,Ue,br,$e,Rn,ae,ze,Yo,yt,yr,Ko,Mr,Gn,E,Mt,vr,en,wr,kr,vt,Ur,wt,$r,zr,Fr,kt,xr,po,Er,qr,Cr,Ut,Jr,$t,jr,Ir,Sr,Fe,Zr,W,zt,Ar,re,Nr,uo,Wr,Rr,tn,Gr,Vr,Pr,xe,Xr,Ee,Vn,ie,qe,on,Ft,Br,nn,Lr,Pn,q,xt,Hr,sn,Or,Qr,Et,Dr,qt,Yr,Kr,ei,Ct,ti,mo,oi,ni,si,Jt,ai,jt,ri,ii,di,X,It,li,de,ci,fo,hi,pi,an,ui,mi,fi,Ce,Xn,le,Je,rn,St,gi,dn,_i,Bn,C,Zt,Ti,ce,bi,ln,yi,Mi,cn,vi,wi,ki,At,Ui,Nt,$i,zi,Fi,Wt,xi,go,Ei,qi,Ci,Rt,Ji,Gt,ji,Ii,Si,B,Vt,Zi,he,Ai,_o,Ni,Wi,hn,Ri,Gi,Vi,je,Ln;return d=new L({}),We=new L({}),De=new L({}),Ye=new L({}),Ke=new Lt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclNlcTJTZXFMTSUyQyUyMEF1dG9Ub2tlbml6ZXIlMEElMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclNlcTJTZXFMTS5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGdW10NS1zbWFsbCUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZ1bXQ1LXNtYWxsJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMEElMjAlMjAlMjAlMjAlMjJBJTIwJTNDZXh0cmFfaWRfMCUzRSUyMHdhbGtzJTIwaW50byUyMGElMjBiYXIlMjBhbmQlMjBvcmRlcnMlMjBhJTIwJTNDZXh0cmFfaWRfMSUzRSUyMHdpdGglMjAlM0NleHRyYV9pZF8yJTNFJTIwcGluY2glMjBvZiUyMCUzQ2V4dHJhX2lkXzMlM0UuJTIyJTJDJTBBJTIwJTIwJTIwJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUyQyUwQSklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKippbnB1dHMpJTBBcHJpbnQodG9rZW5pemVyLmJhdGNoX2RlY29kZShvdXRwdXRzKSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForSeq2SeqLM, AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForSeq2SeqLM.from_pretrained(<span class="hljs-string">&quot;google/umt5-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/umt5-small&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;A &lt;extra_id_0&gt; walks into a bar and orders a &lt;extra_id_1&gt; with &lt;extra_id_2&gt; pinch of &lt;extra_id_3&gt;.&quot;</span>,
<span class="hljs-meta">... </span>    return_tensors=<span class="hljs-string">&quot;pt&quot;</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(tokenizer.batch_decode(outputs))
[<span class="hljs-string">&#x27;&lt;pad&gt;&lt;extra_id_0&gt;nyone who&lt;extra_id_1&gt; drink&lt;extra_id_2&gt; a&lt;extra_id_3&gt; alcohol&lt;extra_id_4&gt; A&lt;extra_id_5&gt; A. This&lt;extra_id_6&gt; I&lt;extra_id_7&gt;&lt;extra_id_52&gt;&lt;extra_id_53&gt;&lt;/s&gt;&#x27;</span>]`}}),et=new L({}),tt=new P({props:{name:"class transformers.UMT5Config",anchor:"transformers.UMT5Config",parameters:[{name:"vocab_size",val:" = 250112"},{name:"d_model",val:" = 512"},{name:"d_kv",val:" = 64"},{name:"d_ff",val:" = 1024"},{name:"num_layers",val:" = 8"},{name:"num_decoder_layers",val:" = None"},{name:"num_heads",val:" = 6"},{name:"relative_attention_num_buckets",val:" = 32"},{name:"relative_attention_max_distance",val:" = 128"},{name:"dropout_rate",val:" = 0.1"},{name:"layer_norm_epsilon",val:" = 1e-06"},{name:"initializer_factor",val:" = 1.0"},{name:"feed_forward_proj",val:" = 'gated-gelu'"},{name:"is_encoder_decoder",val:" = True"},{name:"use_cache",val:" = True"},{name:"tokenizer_class",val:" = 'T5Tokenizer'"},{name:"tie_word_embeddings",val:" = True"},{name:"pad_token_id",val:" = 0"},{name:"eos_token_id",val:" = 1"},{name:"decoder_start_token_id",val:" = 0"},{name:"classifier_dropout",val:" = 0.0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.UMT5Config.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 250112) &#x2014;
Vocabulary size of the UMT5 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/umt5#transformers.UMT5Model">UMT5Model</a> or <code>TFUMT5Model</code>.`,name:"vocab_size"},{anchor:"transformers.UMT5Config.d_model",description:`<strong>d_model</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Size of the encoder layers and the pooler layer.`,name:"d_model"},{anchor:"transformers.UMT5Config.d_kv",description:`<strong>d_kv</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Size of the key, query, value projections per attention head. <code>d_kv</code> has to be equal to <code>d_model // num_heads</code>.`,name:"d_kv"},{anchor:"transformers.UMT5Config.d_ff",description:`<strong>d_ff</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Size of the intermediate feed forward layer in each <code>UMT5Block</code>.`,name:"d_ff"},{anchor:"transformers.UMT5Config.num_layers",description:`<strong>num_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_layers"},{anchor:"transformers.UMT5Config.num_decoder_layers",description:`<strong>num_decoder_layers</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of hidden layers in the Transformer decoder. Will use the same value as <code>num_layers</code> if not set.`,name:"num_decoder_layers"},{anchor:"transformers.UMT5Config.num_heads",description:`<strong>num_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 6) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_heads"},{anchor:"transformers.UMT5Config.relative_attention_num_buckets",description:`<strong>relative_attention_num_buckets</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The number of buckets to use for each attention layer.`,name:"relative_attention_num_buckets"},{anchor:"transformers.UMT5Config.relative_attention_max_distance",description:`<strong>relative_attention_max_distance</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
The maximum distance of the longer sequences for the bucket separation.`,name:"relative_attention_max_distance"},{anchor:"transformers.UMT5Config.dropout_rate",description:`<strong>dropout_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The ratio for all dropout layers.`,name:"dropout_rate"},{anchor:"transformers.UMT5Config.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.UMT5Config.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-6) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.UMT5Config.initializer_factor",description:`<strong>initializer_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
A factor for initializing all weight matrices (should be kept to 1, used internally for initialization
testing).`,name:"initializer_factor"},{anchor:"transformers.UMT5Config.feed_forward_proj",description:`<strong>feed_forward_proj</strong> (<code>string</code>, <em>optional</em>, defaults to <code>&quot;gated-gelu&quot;</code>) &#x2014;
Type of feed forward layer to be used. Should be one of <code>&quot;relu&quot;</code> or <code>&quot;gated-gelu&quot;</code>.`,name:"feed_forward_proj"},{anchor:"transformers.UMT5Config.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/umt5/configuration_umt5.py#L31"}}),nt=new L({}),st=new P({props:{name:"class transformers.UMT5Model",anchor:"transformers.UMT5Model",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.UMT5Model.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/umt5#transformers.UMT5Config">UMT5Config</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/umt5/modeling_umt5.py#L936"}}),ye=new xo({props:{anchor:"transformers.UMT5Model.example",$$slots:{default:[wl]},$$scope:{ctx:$}}}),ct=new P({props:{name:"forward",anchor:"transformers.UMT5Model.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.BoolTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.FloatTensor] = 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.Tensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.UMT5Model.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. UMT5 is a model with relative position embeddings so
you should be able to pad the inputs on both the right and the left.</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 detail.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a></p>
<p>To know more on how to prepare <code>input_ids</code> for pretraining take a look a <a href="./umt5#training">UMT5 Training</a>.`,name:"input_ids"},{anchor:"transformers.UMT5Model.forward.attention_mask",description:`<strong>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 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.UMT5Model.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>UMT5 uses the <code>pad_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</p>
<p>To know more on how to prepare <code>decoder_input_ids</code> for pretraining take a look at <a href="./umt5#training">UMT5
Training</a>.`,name:"decoder_input_ids"},{anchor:"transformers.UMT5Model.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.BoolTensor</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.UMT5Model.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-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.UMT5Model.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-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.UMT5Model.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_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.UMT5Model.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>, <code>optional</code>: <em>hidden_states</em>, <code>optional</code>: <em>attentions</em>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code> 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.UMT5Model.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up 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.UMT5Model.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
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:"inputs_embeds"},{anchor:"transformers.UMT5Model.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.UMT5Model.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.UMT5Model.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.UMT5Model.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.UMT5Model.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/umt5/modeling_umt5.py#L1003",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/umt5#transformers.UMT5Config"
>UMT5Config</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>
`}}),Me=new yn({props:{$$slots:{default:[kl]},$$scope:{ctx:$}}}),ve=new xo({props:{anchor:"transformers.UMT5Model.forward.example",$$slots:{default:[Ul]},$$scope:{ctx:$}}}),ht=new L({}),pt=new P({props:{name:"class transformers.UMT5ForConditionalGeneration",anchor:"transformers.UMT5ForConditionalGeneration",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.UMT5ForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/umt5#transformers.UMT5Config">UMT5Config</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/umt5/modeling_umt5.py#L1102"}}),ke=new xo({props:{anchor:"transformers.UMT5ForConditionalGeneration.example",$$slots:{default:[$l]},$$scope:{ctx:$}}}),bt=new P({props:{name:"forward",anchor:"transformers.UMT5ForConditionalGeneration.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.BoolTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.Tensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.Tensor]]] = 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.UMT5ForConditionalGeneration.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. UMT5 is a model with relative position embeddings so
you should be able to pad the inputs on both the right and the left.</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 detail.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a></p>
<p>To know more on how to prepare <code>input_ids</code> for pretraining take a look a <a href="./umt5#training">UMT5 Training</a>.`,name:"input_ids"},{anchor:"transformers.UMT5ForConditionalGeneration.forward.attention_mask",description:`<strong>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 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.UMT5ForConditionalGeneration.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>UMT5 uses the <code>pad_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</p>
<p>To know more on how to prepare <code>decoder_input_ids</code> for pretraining take a look at <a href="./umt5#training">UMT5
Training</a>.`,name:"decoder_input_ids"},{anchor:"transformers.UMT5ForConditionalGeneration.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.BoolTensor</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.UMT5ForConditionalGeneration.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-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.UMT5ForConditionalGeneration.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-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.UMT5ForConditionalGeneration.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_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.UMT5ForConditionalGeneration.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>, <code>optional</code>: <em>hidden_states</em>, <code>optional</code>: <em>attentions</em>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code> 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.UMT5ForConditionalGeneration.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up 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.UMT5ForConditionalGeneration.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
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:"inputs_embeds"},{anchor:"transformers.UMT5ForConditionalGeneration.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.UMT5ForConditionalGeneration.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.UMT5ForConditionalGeneration.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.UMT5ForConditionalGeneration.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.UMT5ForConditionalGeneration.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.UMT5ForConditionalGeneration.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>[-100, 0, ..., config.vocab_size - 1]</code>. All labels set to <code>-100</code> are ignored (masked), the loss is only computed for
labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/umt5/modeling_umt5.py#L1171",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/umt5#transformers.UMT5Config"
>UMT5Config</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>
`}}),Ue=new yn({props:{$$slots:{default:[zl]},$$scope:{ctx:$}}}),$e=new xo({props:{anchor:"transformers.UMT5ForConditionalGeneration.forward.example",$$slots:{default:[Fl]},$$scope:{ctx:$}}}),yt=new L({}),Mt=new P({props:{name:"class transformers.UMT5EncoderModel",anchor:"transformers.UMT5EncoderModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.UMT5EncoderModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/umt5#transformers.UMT5Config">UMT5Config</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/umt5/modeling_umt5.py#L1344"}}),Fe=new xo({props:{anchor:"transformers.UMT5EncoderModel.example",$$slots:{default:[xl]},$$scope:{ctx:$}}}),zt=new P({props:{name:"forward",anchor:"transformers.UMT5EncoderModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = 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.UMT5EncoderModel.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. UMT5 is a model with relative position embeddings so
you should be able to pad the inputs on both the right and the left.</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 detail.</p>
<p>To know more on how to prepare <code>input_ids</code> for pretraining take a look a <a href="./umt5#training">UMT5 Training</a>.`,name:"input_ids"},{anchor:"transformers.UMT5EncoderModel.forward.attention_mask",description:`<strong>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 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.UMT5EncoderModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-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.UMT5EncoderModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
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:"inputs_embeds"},{anchor:"transformers.UMT5EncoderModel.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.UMT5EncoderModel.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.UMT5EncoderModel.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/umt5/modeling_umt5.py#L1397",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</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/umt5#transformers.UMT5Config"
>UMT5Config</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 model.</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>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),xe=new yn({props:{$$slots:{default:[El]},$$scope:{ctx:$}}}),Ee=new xo({props:{anchor:"transformers.UMT5EncoderModel.forward.example",$$slots:{default:[ql]},$$scope:{ctx:$}}}),Ft=new L({}),xt=new P({props:{name:"class transformers.UMT5ForSequenceClassification",anchor:"transformers.UMT5ForSequenceClassification",parameters:[{name:"config",val:": UMT5Config"}],parametersDescription:[{anchor:"transformers.UMT5ForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/umt5#transformers.UMT5Config">UMT5Config</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/umt5/modeling_umt5.py#L1448"}}),It=new P({props:{name:"forward",anchor:"transformers.UMT5ForSequenceClassification.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.UMT5ForSequenceClassification.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. UMT5 is a model with relative position embeddings so
you should be able to pad the inputs on both the right and the left.</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 detail.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a></p>
<p>To know more on how to prepare <code>input_ids</code> for pretraining take a look a <a href="./umt5#training">UMT5 Training</a>.`,name:"input_ids"},{anchor:"transformers.UMT5ForSequenceClassification.forward.attention_mask",description:`<strong>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 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.UMT5ForSequenceClassification.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>UMT5 uses the <code>pad_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</p>
<p>To know more on how to prepare <code>decoder_input_ids</code> for pretraining take a look at <a href="./umt5#training">UMT5
Training</a>.`,name:"decoder_input_ids"},{anchor:"transformers.UMT5ForSequenceClassification.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.BoolTensor</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.UMT5ForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-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.UMT5ForSequenceClassification.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-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.UMT5ForSequenceClassification.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_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.UMT5ForSequenceClassification.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>, <code>optional</code>: <em>hidden_states</em>, <code>optional</code>: <em>attentions</em>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code> 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.UMT5ForSequenceClassification.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up 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.UMT5ForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
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:"inputs_embeds"},{anchor:"transformers.UMT5ForSequenceClassification.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.UMT5ForSequenceClassification.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.UMT5ForSequenceClassification.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.UMT5ForSequenceClassification.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.UMT5ForSequenceClassification.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.UMT5ForSequenceClassification.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/umt5/modeling_umt5.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/umt5#transformers.UMT5Config"
>UMT5Config</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>
`}}),Ce=new yn({props:{$$slots:{default:[Cl]},$$scope:{ctx:$}}}),St=new L({}),Zt=new P({props:{name:"class transformers.UMT5ForQuestionAnswering",anchor:"transformers.UMT5ForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.UMT5ForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/umt5#transformers.UMT5Config">UMT5Config</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/umt5/modeling_umt5.py#L1582"}}),Vt=new P({props:{name:"forward",anchor:"transformers.UMT5ForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.BoolTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.Tensor]]] = 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.UMT5ForQuestionAnswering.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. UMT5 is a model with relative position embeddings so
you should be able to pad the inputs on both the right and the left.</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 detail.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a></p>
<p>To know more on how to prepare <code>input_ids</code> for pretraining take a look a <a href="./umt5#training">UMT5 Training</a>.`,name:"input_ids"},{anchor:"transformers.UMT5ForQuestionAnswering.forward.attention_mask",description:`<strong>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 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.UMT5ForQuestionAnswering.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>UMT5 uses the <code>pad_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</p>
<p>To know more on how to prepare <code>decoder_input_ids</code> for pretraining take a look at <a href="./umt5#training">UMT5
Training</a>.`,name:"decoder_input_ids"},{anchor:"transformers.UMT5ForQuestionAnswering.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.BoolTensor</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.UMT5ForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-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.UMT5ForQuestionAnswering.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-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.UMT5ForQuestionAnswering.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_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.UMT5ForQuestionAnswering.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>, <code>optional</code>: <em>hidden_states</em>, <code>optional</code>: <em>attentions</em>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code> 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.UMT5ForQuestionAnswering.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up 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.UMT5ForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
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:"inputs_embeds"},{anchor:"transformers.UMT5ForQuestionAnswering.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.UMT5ForQuestionAnswering.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.UMT5ForQuestionAnswering.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.UMT5ForQuestionAnswering.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.UMT5ForQuestionAnswering.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.UMT5ForQuestionAnswering.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.UMT5ForQuestionAnswering.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/umt5/modeling_umt5.py#L1627",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/umt5#transformers.UMT5Config"
>UMT5Config</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>
`}}),je=new yn({props:{$$slots:{default:[Jl]},$$scope:{ctx:$}}}),{c(){c=n("meta"),b=h(),_=n("h1"),f=n("a"),T=n("span"),y(d.$$.fragment),u=h(),z=n("span"),vs=r("UMT5"),Mn=h(),H=n("div"),Ht=n("a"),Ot=n("img"),ws=h(),Qt=n("a"),Dt=n("img"),vn=h(),O=n("h2"),pe=n("a"),qo=n("span"),y(We.$$.fragment),ks=h(),Co=n("span"),Us=r("Overview"),wn=h(),ue=n("p"),$s=r("The UMT5 model was proposed in "),Re=n("a"),zs=r("UniMax: Fairer and More Effective Language Sampling for Large-Scale Multilingual Pretraining"),Fs=r(" by Hyung Won Chung, Xavier Garcia, Adam Roberts, Yi Tay, Orhan Firat, Sharan Narang, Noah Constant."),kn=h(),Yt=n("p"),xs=r("The abstract from the paper is the following:"),Un=h(),Kt=n("p"),Jo=n("em"),Es=r("Pretrained multilingual large language models have typically used heuristic temperature-based sampling to balance between different languages. However previous work has not systematically evaluated the efficacy of different pretraining language distributions across model scales. In this paper, we propose a new sampling method, UniMax, that delivers more uniform coverage of head languages while mitigating overfitting on tail languages by explicitly capping the number of repeats over each language\u2019s corpus. We perform an extensive series of ablations testing a range of sampling strategies on a suite of multilingual benchmarks, while varying model scale. We find that UniMax outperforms standard temperature-based sampling, and the benefits persist as scale increases. As part of our contribution, we release: (i) an improved and refreshed mC4 multilingual corpus consisting of 29 trillion characters across 107 languages, and (ii) a suite of pretrained umT5 model checkpoints trained with UniMax sampling."),$n=h(),eo=n("p"),qs=r("Tips:"),zn=h(),me=n("ul"),Ge=n("li"),Cs=r("UMT5 was only pre-trained on "),Ve=n("a"),Js=r("mC4"),js=r(` excluding any supervised training.
Therefore, this model has to be fine-tuned before it is usable on a downstream task, unlike the original T5 model.`),Is=h(),jo=n("li"),Ss=r(`Since umT5 was pre-trained in an unsupervise manner, there\u2019s no real advantage to using a task prefix during single-task
fine-tuning. If you are doing multi-task fine-tuning, you should use a prefix.`),Fn=h(),to=n("p"),Zs=r("Google has released the following variants:"),xn=h(),S=n("ul"),Io=n("li"),Pe=n("a"),As=r("google/umt5-small"),Ns=h(),So=n("li"),Xe=n("a"),Ws=r("google/umt5-base"),Rs=h(),Zo=n("li"),Be=n("a"),Gs=r("google/umt5-xl"),Vs=h(),oo=n("li"),Le=n("a"),Ps=r("google/umt5-xxl"),Xs=r("."),En=h(),Z=n("p"),Bs=r("This model was contributed by "),He=n("a"),Ls=r("agemagician"),Hs=r(" and "),Oe=n("a"),Os=r("stefan-it"),Qs=r(`. The original code can be
found `),Qe=n("a"),Ds=r("here"),Ys=r("."),qn=h(),fe=n("p"),Ks=r("One can refer to "),no=n("a"),ea=r("T5\u2019s documentation page"),ta=r(" for more tips, code examples and notebooks."),Cn=h(),Q=n("h2"),ge=n("a"),Ao=n("span"),y(De.$$.fragment),oa=h(),No=n("span"),na=r("Differences with mT5?"),Jn=r("\n\n`UmT5` is based on mT5, with a non-shared relative positional bias that is computed for each layer. This means that the model set `has_relative_bias` for each layer.\nThe conversion script is also different because the model was saved in t5x's latest checkpointing format.\n"),D=n("h1"),_e=n("a"),Wo=n("span"),y(Ye.$$.fragment),sa=h(),Ro=n("span"),aa=r("Sample usage"),jn=h(),y(Ke.$$.fragment),In=h(),Y=n("h2"),Te=n("a"),Go=n("span"),y(et.$$.fragment),ra=h(),Vo=n("span"),ia=r("UMT5Config"),Sn=h(),V=n("div"),y(tt.$$.fragment),da=h(),K=n("p"),la=r("This is the configuration class to store the configuration of a "),so=n("a"),ca=r("UMT5Model"),ha=r(`. It is used to instantiate a UMT5
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 UMT5
`),ot=n("a"),pa=r("google/umt5-small"),ua=r(" architecture."),ma=h(),ee=n("p"),fa=r("Configuration objects inherit from "),ao=n("a"),ga=r("PretrainedConfig"),_a=r(` and can be used to control the model outputs. Read the
documentation from `),ro=n("a"),Ta=r("PretrainedConfig"),ba=r(" for more information."),Zn=h(),te=n("h2"),be=n("a"),Po=n("span"),y(nt.$$.fragment),ya=h(),Xo=n("span"),Ma=r("UMT5Model"),An=h(),F=n("div"),y(st.$$.fragment),va=h(),Bo=n("p"),wa=r("The bare UMT5 Model transformer outputting raw hidden-states without any specific head on top."),ka=h(),at=n("p"),Ua=r("The UMT5 model was proposed in "),rt=n("a"),$a=r(`Exploring the Limits of Transfer Learning with a Unified Text-to-Text
Transformer`),za=r(` by Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan
Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J. Liu. It\u2019s an encoder decoder transformer pre-trained in a
text-to-text denoising generative setting.`),Fa=h(),it=n("p"),xa=r("This model inherits from "),io=n("a"),Ea=r("PreTrainedModel"),qa=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Ca=h(),dt=n("p"),Ja=r("This model is also a PyTorch "),lt=n("a"),ja=r("torch.nn.Module"),Ia=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Sa=h(),y(ye.$$.fragment),Za=h(),A=n("div"),y(ct.$$.fragment),Aa=h(),oe=n("p"),Na=r("The "),lo=n("a"),Wa=r("UMT5Model"),Ra=r(" forward method, overrides the "),Lo=n("code"),Ga=r("__call__"),Va=r(" special method."),Pa=h(),y(Me.$$.fragment),Xa=h(),y(ve.$$.fragment),Nn=h(),ne=n("h2"),we=n("a"),Ho=n("span"),y(ht.$$.fragment),Ba=h(),Oo=n("span"),La=r("UMT5ForConditionalGeneration"),Wn=h(),x=n("div"),y(pt.$$.fragment),Ha=h(),ut=n("p"),Oa=r("UMT5 Model with a "),Qo=n("code"),Qa=r("language modeling"),Da=r(" head on top."),Ya=h(),mt=n("p"),Ka=r("The UMT5 model was proposed in "),ft=n("a"),er=r(`Exploring the Limits of Transfer Learning with a Unified Text-to-Text
Transformer`),tr=r(` by Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan
Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J. Liu. It\u2019s an encoder decoder transformer pre-trained in a
text-to-text denoising generative setting.`),or=h(),gt=n("p"),nr=r("This model inherits from "),co=n("a"),sr=r("PreTrainedModel"),ar=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),rr=h(),_t=n("p"),ir=r("This model is also a PyTorch "),Tt=n("a"),dr=r("torch.nn.Module"),lr=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),cr=h(),y(ke.$$.fragment),hr=h(),N=n("div"),y(bt.$$.fragment),pr=h(),se=n("p"),ur=r("The "),ho=n("a"),mr=r("UMT5ForConditionalGeneration"),fr=r(" forward method, overrides the "),Do=n("code"),gr=r("__call__"),_r=r(" special method."),Tr=h(),y(Ue.$$.fragment),br=h(),y($e.$$.fragment),Rn=h(),ae=n("h2"),ze=n("a"),Yo=n("span"),y(yt.$$.fragment),yr=h(),Ko=n("span"),Mr=r("UMT5EncoderModel"),Gn=h(),E=n("div"),y(Mt.$$.fragment),vr=h(),en=n("p"),wr=r("The bare UMT5 Model transformer outputting encoder\u2019s raw hidden-states without any specific head on top."),kr=h(),vt=n("p"),Ur=r("The UMT5 model was proposed in "),wt=n("a"),$r=r(`Exploring the Limits of Transfer Learning with a Unified Text-to-Text
Transformer`),zr=r(` by Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan
Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J. Liu. It\u2019s an encoder decoder transformer pre-trained in a
text-to-text denoising generative setting.`),Fr=h(),kt=n("p"),xr=r("This model inherits from "),po=n("a"),Er=r("PreTrainedModel"),qr=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Cr=h(),Ut=n("p"),Jr=r("This model is also a PyTorch "),$t=n("a"),jr=r("torch.nn.Module"),Ir=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Sr=h(),y(Fe.$$.fragment),Zr=h(),W=n("div"),y(zt.$$.fragment),Ar=h(),re=n("p"),Nr=r("The "),uo=n("a"),Wr=r("UMT5EncoderModel"),Rr=r(" forward method, overrides the "),tn=n("code"),Gr=r("__call__"),Vr=r(" special method."),Pr=h(),y(xe.$$.fragment),Xr=h(),y(Ee.$$.fragment),Vn=h(),ie=n("h2"),qe=n("a"),on=n("span"),y(Ft.$$.fragment),Br=h(),nn=n("span"),Lr=r("UMT5ForSequenceClassification"),Pn=h(),q=n("div"),y(xt.$$.fragment),Hr=h(),sn=n("p"),Or=r(`UMT5 model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),Qr=h(),Et=n("p"),Dr=r("The UMT5 model was proposed in "),qt=n("a"),Yr=r(`Exploring the Limits of Transfer Learning with a Unified Text-to-Text
Transformer`),Kr=r(` by Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan
Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J. Liu. It\u2019s an encoder decoder transformer pre-trained in a
text-to-text denoising generative setting.`),ei=h(),Ct=n("p"),ti=r("This model inherits from "),mo=n("a"),oi=r("PreTrainedModel"),ni=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),si=h(),Jt=n("p"),ai=r("This model is also a PyTorch "),jt=n("a"),ri=r("torch.nn.Module"),ii=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),di=h(),X=n("div"),y(It.$$.fragment),li=h(),de=n("p"),ci=r("The "),fo=n("a"),hi=r("UMT5ForSequenceClassification"),pi=r(" forward method, overrides the "),an=n("code"),ui=r("__call__"),mi=r(" special method."),fi=h(),y(Ce.$$.fragment),Xn=h(),le=n("h2"),Je=n("a"),rn=n("span"),y(St.$$.fragment),gi=h(),dn=n("span"),_i=r("UMT5ForQuestionAnswering"),Bn=h(),C=n("div"),y(Zt.$$.fragment),Ti=h(),ce=n("p"),bi=r(`UMT5 Model with a span classification head on top for extractive question-answering tasks like SQuAD (linear layers
on top of the hidden-states output to compute `),ln=n("code"),yi=r("span start logits"),Mi=r(" and "),cn=n("code"),vi=r("span end logits"),wi=r(")."),ki=h(),At=n("p"),Ui=r("The UMT5 model was proposed in "),Nt=n("a"),$i=r(`Exploring the Limits of Transfer Learning with a Unified Text-to-Text
Transformer`),zi=r(` by Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan
Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J. Liu. It\u2019s an encoder decoder transformer pre-trained in a
text-to-text denoising generative setting.`),Fi=h(),Wt=n("p"),xi=r("This model inherits from "),go=n("a"),Ei=r("PreTrainedModel"),qi=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Ci=h(),Rt=n("p"),Ji=r("This model is also a PyTorch "),Gt=n("a"),ji=r("torch.nn.Module"),Ii=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Si=h(),B=n("div"),y(Vt.$$.fragment),Zi=h(),he=n("p"),Ai=r("The "),_o=n("a"),Ni=r("UMT5ForQuestionAnswering"),Wi=r(" forward method, overrides the "),hn=n("code"),Ri=r("__call__"),Gi=r(" special method."),Vi=h(),y(je.$$.fragment),this.h()},l(t){const m=Ml('[data-svelte="svelte-1phssyn"]',document.head);c=s(m,"META",{name:!0,content:!0}),m.forEach(o),b=p(t),_=s(t,"H1",{class:!0});var Pt=a(_);f=s(Pt,"A",{id:!0,class:!0,href:!0});var pn=a(f);T=s(pn,"SPAN",{});var un=a(T);M(d.$$.fragment,un),un.forEach(o),pn.forEach(o),u=p(Pt),z=s(Pt,"SPAN",{});var mn=a(z);vs=i(mn,"UMT5"),mn.forEach(o),Pt.forEach(o),Mn=p(t),H=s(t,"DIV",{class:!0});var Xt=a(H);Ht=s(Xt,"A",{href:!0});var fn=a(Ht);Ot=s(fn,"IMG",{alt:!0,src:!0}),fn.forEach(o),ws=p(Xt),Qt=s(Xt,"A",{href:!0});var gn=a(Qt);Dt=s(gn,"IMG",{alt:!0,src:!0}),gn.forEach(o),Xt.forEach(o),vn=p(t),O=s(t,"H2",{class:!0});var Bt=a(O);pe=s(Bt,"A",{id:!0,class:!0,href:!0});var _n=a(pe);qo=s(_n,"SPAN",{});var Tn=a(qo);M(We.$$.fragment,Tn),Tn.forEach(o),_n.forEach(o),ks=p(Bt),Co=s(Bt,"SPAN",{});var bn=a(Co);Us=i(bn,"Overview"),bn.forEach(o),Bt.forEach(o),wn=p(t),ue=s(t,"P",{});var Hn=a(ue);$s=i(Hn,"The UMT5 model was proposed in "),Re=s(Hn,"A",{href:!0,rel:!0});var Li=a(Re);zs=i(Li,"UniMax: Fairer and More Effective Language Sampling for Large-Scale Multilingual Pretraining"),Li.forEach(o),Fs=i(Hn," by Hyung Won Chung, Xavier Garcia, Adam Roberts, Yi Tay, Orhan Firat, Sharan Narang, Noah Constant."),Hn.forEach(o),kn=p(t),Yt=s(t,"P",{});var Hi=a(Yt);xs=i(Hi,"The abstract from the paper is the following:"),Hi.forEach(o),Un=p(t),Kt=s(t,"P",{});var Oi=a(Kt);Jo=s(Oi,"EM",{});var Qi=a(Jo);Es=i(Qi,"Pretrained multilingual large language models have typically used heuristic temperature-based sampling to balance between different languages. However previous work has not systematically evaluated the efficacy of different pretraining language distributions across model scales. In this paper, we propose a new sampling method, UniMax, that delivers more uniform coverage of head languages while mitigating overfitting on tail languages by explicitly capping the number of repeats over each language\u2019s corpus. We perform an extensive series of ablations testing a range of sampling strategies on a suite of multilingual benchmarks, while varying model scale. We find that UniMax outperforms standard temperature-based sampling, and the benefits persist as scale increases. As part of our contribution, we release: (i) an improved and refreshed mC4 multilingual corpus consisting of 29 trillion characters across 107 languages, and (ii) a suite of pretrained umT5 model checkpoints trained with UniMax sampling."),Qi.forEach(o),Oi.forEach(o),$n=p(t),eo=s(t,"P",{});var Di=a(eo);qs=i(Di,"Tips:"),Di.forEach(o),zn=p(t),me=s(t,"UL",{});var On=a(me);Ge=s(On,"LI",{});var Qn=a(Ge);Cs=i(Qn,"UMT5 was only pre-trained on "),Ve=s(Qn,"A",{href:!0,rel:!0});var Yi=a(Ve);Js=i(Yi,"mC4"),Yi.forEach(o),js=i(Qn,` excluding any supervised training.
Therefore, this model has to be fine-tuned before it is usable on a downstream task, unlike the original T5 model.`),Qn.forEach(o),Is=p(On),jo=s(On,"LI",{});var Ki=a(jo);Ss=i(Ki,`Since umT5 was pre-trained in an unsupervise manner, there\u2019s no real advantage to using a task prefix during single-task
fine-tuning. If you are doing multi-task fine-tuning, you should use a prefix.`),Ki.forEach(o),On.forEach(o),Fn=p(t),to=s(t,"P",{});var ed=a(to);Zs=i(ed,"Google has released the following variants:"),ed.forEach(o),xn=p(t),S=s(t,"UL",{});var Ie=a(S);Io=s(Ie,"LI",{});var td=a(Io);Pe=s(td,"A",{href:!0,rel:!0});var od=a(Pe);As=i(od,"google/umt5-small"),od.forEach(o),td.forEach(o),Ns=p(Ie),So=s(Ie,"LI",{});var nd=a(So);Xe=s(nd,"A",{href:!0,rel:!0});var sd=a(Xe);Ws=i(sd,"google/umt5-base"),sd.forEach(o),nd.forEach(o),Rs=p(Ie),Zo=s(Ie,"LI",{});var ad=a(Zo);Be=s(ad,"A",{href:!0,rel:!0});var rd=a(Be);Gs=i(rd,"google/umt5-xl"),rd.forEach(o),ad.forEach(o),Vs=p(Ie),oo=s(Ie,"LI",{});var Pi=a(oo);Le=s(Pi,"A",{href:!0,rel:!0});var id=a(Le);Ps=i(id,"google/umt5-xxl"),id.forEach(o),Xs=i(Pi,"."),Pi.forEach(o),Ie.forEach(o),En=p(t),Z=s(t,"P",{});var Se=a(Z);Bs=i(Se,"This model was contributed by "),He=s(Se,"A",{href:!0,rel:!0});var dd=a(He);Ls=i(dd,"agemagician"),dd.forEach(o),Hs=i(Se," and "),Oe=s(Se,"A",{href:!0,rel:!0});var ld=a(Oe);Os=i(ld,"stefan-it"),ld.forEach(o),Qs=i(Se,`. The original code can be
found `),Qe=s(Se,"A",{href:!0,rel:!0});var cd=a(Qe);Ds=i(cd,"here"),cd.forEach(o),Ys=i(Se,"."),Se.forEach(o),qn=p(t),fe=s(t,"P",{});var Dn=a(fe);Ks=i(Dn,"One can refer to "),no=s(Dn,"A",{href:!0});var hd=a(no);ea=i(hd,"T5\u2019s documentation page"),hd.forEach(o),ta=i(Dn," for more tips, code examples and notebooks."),Dn.forEach(o),Cn=p(t),Q=s(t,"H2",{class:!0});var Yn=a(Q);ge=s(Yn,"A",{id:!0,class:!0,href:!0});var pd=a(ge);Ao=s(pd,"SPAN",{});var ud=a(Ao);M(De.$$.fragment,ud),ud.forEach(o),pd.forEach(o),oa=p(Yn),No=s(Yn,"SPAN",{});var md=a(No);na=i(md,"Differences with mT5?"),md.forEach(o),Yn.forEach(o),Jn=i(t,"\n\n`UmT5` is based on mT5, with a non-shared relative positional bias that is computed for each layer. This means that the model set `has_relative_bias` for each layer.\nThe conversion script is also different because the model was saved in t5x's latest checkpointing format.\n"),D=s(t,"H1",{class:!0});var Kn=a(D);_e=s(Kn,"A",{id:!0,class:!0,href:!0});var fd=a(_e);Wo=s(fd,"SPAN",{});var gd=a(Wo);M(Ye.$$.fragment,gd),gd.forEach(o),fd.forEach(o),sa=p(Kn),Ro=s(Kn,"SPAN",{});var _d=a(Ro);aa=i(_d,"Sample usage"),_d.forEach(o),Kn.forEach(o),jn=p(t),M(Ke.$$.fragment,t),In=p(t),Y=s(t,"H2",{class:!0});var es=a(Y);Te=s(es,"A",{id:!0,class:!0,href:!0});var Td=a(Te);Go=s(Td,"SPAN",{});var bd=a(Go);M(et.$$.fragment,bd),bd.forEach(o),Td.forEach(o),ra=p(es),Vo=s(es,"SPAN",{});var yd=a(Vo);ia=i(yd,"UMT5Config"),yd.forEach(o),es.forEach(o),Sn=p(t),V=s(t,"DIV",{class:!0});var To=a(V);M(tt.$$.fragment,To),da=p(To),K=s(To,"P",{});var bo=a(K);la=i(bo,"This is the configuration class to store the configuration of a "),so=s(bo,"A",{href:!0});var Md=a(so);ca=i(Md,"UMT5Model"),Md.forEach(o),ha=i(bo,`. It is used to instantiate a UMT5
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 UMT5
`),ot=s(bo,"A",{href:!0,rel:!0});var vd=a(ot);pa=i(vd,"google/umt5-small"),vd.forEach(o),ua=i(bo," architecture."),bo.forEach(o),ma=p(To),ee=s(To,"P",{});var yo=a(ee);fa=i(yo,"Configuration objects inherit from "),ao=s(yo,"A",{href:!0});var wd=a(ao);ga=i(wd,"PretrainedConfig"),wd.forEach(o),_a=i(yo,` and can be used to control the model outputs. Read the
documentation from `),ro=s(yo,"A",{href:!0});var kd=a(ro);Ta=i(kd,"PretrainedConfig"),kd.forEach(o),ba=i(yo," for more information."),yo.forEach(o),To.forEach(o),Zn=p(t),te=s(t,"H2",{class:!0});var ts=a(te);be=s(ts,"A",{id:!0,class:!0,href:!0});var Ud=a(be);Po=s(Ud,"SPAN",{});var $d=a(Po);M(nt.$$.fragment,$d),$d.forEach(o),Ud.forEach(o),ya=p(ts),Xo=s(ts,"SPAN",{});var zd=a(Xo);Ma=i(zd,"UMT5Model"),zd.forEach(o),ts.forEach(o),An=p(t),F=s(t,"DIV",{class:!0});var J=a(F);M(st.$$.fragment,J),va=p(J),Bo=s(J,"P",{});var Fd=a(Bo);wa=i(Fd,"The bare UMT5 Model transformer outputting raw hidden-states without any specific head on top."),Fd.forEach(o),ka=p(J),at=s(J,"P",{});var os=a(at);Ua=i(os,"The UMT5 model was proposed in "),rt=s(os,"A",{href:!0,rel:!0});var xd=a(rt);$a=i(xd,`Exploring the Limits of Transfer Learning with a Unified Text-to-Text
Transformer`),xd.forEach(o),za=i(os,` by Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan
Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J. Liu. It\u2019s an encoder decoder transformer pre-trained in a
text-to-text denoising generative setting.`),os.forEach(o),Fa=p(J),it=s(J,"P",{});var ns=a(it);xa=i(ns,"This model inherits from "),io=s(ns,"A",{href:!0});var Ed=a(io);Ea=i(Ed,"PreTrainedModel"),Ed.forEach(o),qa=i(ns,`. 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.)`),ns.forEach(o),Ca=p(J),dt=s(J,"P",{});var ss=a(dt);Ja=i(ss,"This model is also a PyTorch "),lt=s(ss,"A",{href:!0,rel:!0});var qd=a(lt);ja=i(qd,"torch.nn.Module"),qd.forEach(o),Ia=i(ss,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ss.forEach(o),Sa=p(J),M(ye.$$.fragment,J),Za=p(J),A=s(J,"DIV",{class:!0});var Ze=a(A);M(ct.$$.fragment,Ze),Aa=p(Ze),oe=s(Ze,"P",{});var Mo=a(oe);Na=i(Mo,"The "),lo=s(Mo,"A",{href:!0});var Cd=a(lo);Wa=i(Cd,"UMT5Model"),Cd.forEach(o),Ra=i(Mo," forward method, overrides the "),Lo=s(Mo,"CODE",{});var Jd=a(Lo);Ga=i(Jd,"__call__"),Jd.forEach(o),Va=i(Mo," special method."),Mo.forEach(o),Pa=p(Ze),M(Me.$$.fragment,Ze),Xa=p(Ze),M(ve.$$.fragment,Ze),Ze.forEach(o),J.forEach(o),Nn=p(t),ne=s(t,"H2",{class:!0});var as=a(ne);we=s(as,"A",{id:!0,class:!0,href:!0});var jd=a(we);Ho=s(jd,"SPAN",{});var Id=a(Ho);M(ht.$$.fragment,Id),Id.forEach(o),jd.forEach(o),Ba=p(as),Oo=s(as,"SPAN",{});var Sd=a(Oo);La=i(Sd,"UMT5ForConditionalGeneration"),Sd.forEach(o),as.forEach(o),Wn=p(t),x=s(t,"DIV",{class:!0});var j=a(x);M(pt.$$.fragment,j),Ha=p(j),ut=s(j,"P",{});var rs=a(ut);Oa=i(rs,"UMT5 Model with a "),Qo=s(rs,"CODE",{});var Zd=a(Qo);Qa=i(Zd,"language modeling"),Zd.forEach(o),Da=i(rs," head on top."),rs.forEach(o),Ya=p(j),mt=s(j,"P",{});var is=a(mt);Ka=i(is,"The UMT5 model was proposed in "),ft=s(is,"A",{href:!0,rel:!0});var Ad=a(ft);er=i(Ad,`Exploring the Limits of Transfer Learning with a Unified Text-to-Text
Transformer`),Ad.forEach(o),tr=i(is,` by Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan
Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J. Liu. It\u2019s an encoder decoder transformer pre-trained in a
text-to-text denoising generative setting.`),is.forEach(o),or=p(j),gt=s(j,"P",{});var ds=a(gt);nr=i(ds,"This model inherits from "),co=s(ds,"A",{href:!0});var Nd=a(co);sr=i(Nd,"PreTrainedModel"),Nd.forEach(o),ar=i(ds,`. 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.)`),ds.forEach(o),rr=p(j),_t=s(j,"P",{});var ls=a(_t);ir=i(ls,"This model is also a PyTorch "),Tt=s(ls,"A",{href:!0,rel:!0});var Wd=a(Tt);dr=i(Wd,"torch.nn.Module"),Wd.forEach(o),lr=i(ls,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ls.forEach(o),cr=p(j),M(ke.$$.fragment,j),hr=p(j),N=s(j,"DIV",{class:!0});var Ae=a(N);M(bt.$$.fragment,Ae),pr=p(Ae),se=s(Ae,"P",{});var vo=a(se);ur=i(vo,"The "),ho=s(vo,"A",{href:!0});var Rd=a(ho);mr=i(Rd,"UMT5ForConditionalGeneration"),Rd.forEach(o),fr=i(vo," forward method, overrides the "),Do=s(vo,"CODE",{});var Gd=a(Do);gr=i(Gd,"__call__"),Gd.forEach(o),_r=i(vo," special method."),vo.forEach(o),Tr=p(Ae),M(Ue.$$.fragment,Ae),br=p(Ae),M($e.$$.fragment,Ae),Ae.forEach(o),j.forEach(o),Rn=p(t),ae=s(t,"H2",{class:!0});var cs=a(ae);ze=s(cs,"A",{id:!0,class:!0,href:!0});var Vd=a(ze);Yo=s(Vd,"SPAN",{});var Pd=a(Yo);M(yt.$$.fragment,Pd),Pd.forEach(o),Vd.forEach(o),yr=p(cs),Ko=s(cs,"SPAN",{});var Xd=a(Ko);Mr=i(Xd,"UMT5EncoderModel"),Xd.forEach(o),cs.forEach(o),Gn=p(t),E=s(t,"DIV",{class:!0});var I=a(E);M(Mt.$$.fragment,I),vr=p(I),en=s(I,"P",{});var Bd=a(en);wr=i(Bd,"The bare UMT5 Model transformer outputting encoder\u2019s raw hidden-states without any specific head on top."),Bd.forEach(o),kr=p(I),vt=s(I,"P",{});var hs=a(vt);Ur=i(hs,"The UMT5 model was proposed in "),wt=s(hs,"A",{href:!0,rel:!0});var Ld=a(wt);$r=i(Ld,`Exploring the Limits of Transfer Learning with a Unified Text-to-Text
Transformer`),Ld.forEach(o),zr=i(hs,` by Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan
Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J. Liu. It\u2019s an encoder decoder transformer pre-trained in a
text-to-text denoising generative setting.`),hs.forEach(o),Fr=p(I),kt=s(I,"P",{});var ps=a(kt);xr=i(ps,"This model inherits from "),po=s(ps,"A",{href:!0});var Hd=a(po);Er=i(Hd,"PreTrainedModel"),Hd.forEach(o),qr=i(ps,`. 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.)`),ps.forEach(o),Cr=p(I),Ut=s(I,"P",{});var us=a(Ut);Jr=i(us,"This model is also a PyTorch "),$t=s(us,"A",{href:!0,rel:!0});var Od=a($t);jr=i(Od,"torch.nn.Module"),Od.forEach(o),Ir=i(us,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),us.forEach(o),Sr=p(I),M(Fe.$$.fragment,I),Zr=p(I),W=s(I,"DIV",{class:!0});var Ne=a(W);M(zt.$$.fragment,Ne),Ar=p(Ne),re=s(Ne,"P",{});var wo=a(re);Nr=i(wo,"The "),uo=s(wo,"A",{href:!0});var Qd=a(uo);Wr=i(Qd,"UMT5EncoderModel"),Qd.forEach(o),Rr=i(wo," forward method, overrides the "),tn=s(wo,"CODE",{});var Dd=a(tn);Gr=i(Dd,"__call__"),Dd.forEach(o),Vr=i(wo," special method."),wo.forEach(o),Pr=p(Ne),M(xe.$$.fragment,Ne),Xr=p(Ne),M(Ee.$$.fragment,Ne),Ne.forEach(o),I.forEach(o),Vn=p(t),ie=s(t,"H2",{class:!0});var ms=a(ie);qe=s(ms,"A",{id:!0,class:!0,href:!0});var Yd=a(qe);on=s(Yd,"SPAN",{});var Kd=a(on);M(Ft.$$.fragment,Kd),Kd.forEach(o),Yd.forEach(o),Br=p(ms),nn=s(ms,"SPAN",{});var el=a(nn);Lr=i(el,"UMT5ForSequenceClassification"),el.forEach(o),ms.forEach(o),Pn=p(t),q=s(t,"DIV",{class:!0});var R=a(q);M(xt.$$.fragment,R),Hr=p(R),sn=s(R,"P",{});var tl=a(sn);Or=i(tl,`UMT5 model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for GLUE
tasks.`),tl.forEach(o),Qr=p(R),Et=s(R,"P",{});var fs=a(Et);Dr=i(fs,"The UMT5 model was proposed in "),qt=s(fs,"A",{href:!0,rel:!0});var ol=a(qt);Yr=i(ol,`Exploring the Limits of Transfer Learning with a Unified Text-to-Text
Transformer`),ol.forEach(o),Kr=i(fs,` by Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan
Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J. Liu. It\u2019s an encoder decoder transformer pre-trained in a
text-to-text denoising generative setting.`),fs.forEach(o),ei=p(R),Ct=s(R,"P",{});var gs=a(Ct);ti=i(gs,"This model inherits from "),mo=s(gs,"A",{href:!0});var nl=a(mo);oi=i(nl,"PreTrainedModel"),nl.forEach(o),ni=i(gs,`. 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.)`),gs.forEach(o),si=p(R),Jt=s(R,"P",{});var _s=a(Jt);ai=i(_s,"This model is also a PyTorch "),jt=s(_s,"A",{href:!0,rel:!0});var sl=a(jt);ri=i(sl,"torch.nn.Module"),sl.forEach(o),ii=i(_s,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),_s.forEach(o),di=p(R),X=s(R,"DIV",{class:!0});var ko=a(X);M(It.$$.fragment,ko),li=p(ko),de=s(ko,"P",{});var Uo=a(de);ci=i(Uo,"The "),fo=s(Uo,"A",{href:!0});var al=a(fo);hi=i(al,"UMT5ForSequenceClassification"),al.forEach(o),pi=i(Uo," forward method, overrides the "),an=s(Uo,"CODE",{});var rl=a(an);ui=i(rl,"__call__"),rl.forEach(o),mi=i(Uo," special method."),Uo.forEach(o),fi=p(ko),M(Ce.$$.fragment,ko),ko.forEach(o),R.forEach(o),Xn=p(t),le=s(t,"H2",{class:!0});var Ts=a(le);Je=s(Ts,"A",{id:!0,class:!0,href:!0});var il=a(Je);rn=s(il,"SPAN",{});var dl=a(rn);M(St.$$.fragment,dl),dl.forEach(o),il.forEach(o),gi=p(Ts),dn=s(Ts,"SPAN",{});var ll=a(dn);_i=i(ll,"UMT5ForQuestionAnswering"),ll.forEach(o),Ts.forEach(o),Bn=p(t),C=s(t,"DIV",{class:!0});var G=a(C);M(Zt.$$.fragment,G),Ti=p(G),ce=s(G,"P",{});var $o=a(ce);bi=i($o,`UMT5 Model with a span classification head on top for extractive question-answering tasks like SQuAD (linear layers
on top of the hidden-states output to compute `),ln=s($o,"CODE",{});var cl=a(ln);yi=i(cl,"span start logits"),cl.forEach(o),Mi=i($o," and "),cn=s($o,"CODE",{});var hl=a(cn);vi=i(hl,"span end logits"),hl.forEach(o),wi=i($o,")."),$o.forEach(o),ki=p(G),At=s(G,"P",{});var bs=a(At);Ui=i(bs,"The UMT5 model was proposed in "),Nt=s(bs,"A",{href:!0,rel:!0});var pl=a(Nt);$i=i(pl,`Exploring the Limits of Transfer Learning with a Unified Text-to-Text
Transformer`),pl.forEach(o),zi=i(bs,` by Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan
Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J. Liu. It\u2019s an encoder decoder transformer pre-trained in a
text-to-text denoising generative setting.`),bs.forEach(o),Fi=p(G),Wt=s(G,"P",{});var ys=a(Wt);xi=i(ys,"This model inherits from "),go=s(ys,"A",{href:!0});var ul=a(go);Ei=i(ul,"PreTrainedModel"),ul.forEach(o),qi=i(ys,`. 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.)`),ys.forEach(o),Ci=p(G),Rt=s(G,"P",{});var Ms=a(Rt);Ji=i(Ms,"This model is also a PyTorch "),Gt=s(Ms,"A",{href:!0,rel:!0});var ml=a(Gt);ji=i(ml,"torch.nn.Module"),ml.forEach(o),Ii=i(Ms,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ms.forEach(o),Si=p(G),B=s(G,"DIV",{class:!0});var zo=a(B);M(Vt.$$.fragment,zo),Zi=p(zo),he=s(zo,"P",{});var Fo=a(he);Ai=i(Fo,"The "),_o=s(Fo,"A",{href:!0});var fl=a(_o);Ni=i(fl,"UMT5ForQuestionAnswering"),fl.forEach(o),Wi=i(Fo," forward method, overrides the "),hn=s(Fo,"CODE",{});var gl=a(hn);Ri=i(gl,"__call__"),gl.forEach(o),Gi=i(Fo," special method."),Fo.forEach(o),Vi=p(zo),M(je.$$.fragment,zo),zo.forEach(o),G.forEach(o),this.h()},h(){l(c,"name","hf:doc:metadata"),l(c,"content",JSON.stringify(Il)),l(f,"id","umt5"),l(f,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(f,"href","#umt5"),l(_,"class","relative group"),l(Ot,"alt","Models"),_l(Ot.src,Xi="https://img.shields.io/badge/All_model_pages-mt5-blueviolet")||l(Ot,"src",Xi),l(Ht,"href","https://huggingface.co/models?filter=umt5"),l(Dt,"alt","Spaces"),_l(Dt.src,Bi="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||l(Dt,"src",Bi),l(Qt,"href","https://huggingface.co/spaces/docs-demos/mt5-small-finetuned-arxiv-cs-finetuned-arxiv-cs-full"),l(H,"class","flex flex-wrap space-x-1"),l(pe,"id","overview"),l(pe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(pe,"href","#overview"),l(O,"class","relative group"),l(Re,"href","https://openreview.net/forum?id=kXwdL1cWOAi"),l(Re,"rel","nofollow"),l(Ve,"href","https://huggingface.co/datasets/mc4"),l(Ve,"rel","nofollow"),l(Pe,"href","https://huggingface.co/google/umt5-small"),l(Pe,"rel","nofollow"),l(Xe,"href","https://huggingface.co/google/umt5-base"),l(Xe,"rel","nofollow"),l(Be,"href","https://huggingface.co/google/umt5-xl"),l(Be,"rel","nofollow"),l(Le,"href","https://huggingface.co/google/umt5-xxl"),l(Le,"rel","nofollow"),l(He,"href","https://huggingface.co/agemagician"),l(He,"rel","nofollow"),l(Oe,"href","https://huggingface.co/stefan-it"),l(Oe,"rel","nofollow"),l(Qe,"href","https://github.com/google-research/t5x"),l(Qe,"rel","nofollow"),l(no,"href","t5"),l(ge,"id","differences-with-mt5"),l(ge,"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"),l(ge,"href","#differences-with-mt5"),l(Q,"class","relative group"),l(_e,"id","sample-usage"),l(_e,"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"),l(_e,"href","#sample-usage"),l(D,"class","relative group"),l(Te,"id","transformers.UMT5Config"),l(Te,"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"),l(Te,"href","#transformers.UMT5Config"),l(Y,"class","relative group"),l(so,"href","/docs/transformers/main/en/model_doc/umt5#transformers.UMT5Model"),l(ot,"href","https://huggingface.co/google/umt5-small"),l(ot,"rel","nofollow"),l(ao,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),l(ro,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),l(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(be,"id","transformers.UMT5Model"),l(be,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(be,"href","#transformers.UMT5Model"),l(te,"class","relative group"),l(rt,"href","https://arxiv.org/abs/1910.10683"),l(rt,"rel","nofollow"),l(io,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),l(lt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(lt,"rel","nofollow"),l(lo,"href","/docs/transformers/main/en/model_doc/umt5#transformers.UMT5Model"),l(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(we,"id","transformers.UMT5ForConditionalGeneration"),l(we,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(we,"href","#transformers.UMT5ForConditionalGeneration"),l(ne,"class","relative group"),l(ft,"href","https://arxiv.org/abs/1910.10683"),l(ft,"rel","nofollow"),l(co,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),l(Tt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(Tt,"rel","nofollow"),l(ho,"href","/docs/transformers/main/en/model_doc/umt5#transformers.UMT5ForConditionalGeneration"),l(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ze,"id","transformers.UMT5EncoderModel"),l(ze,"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"),l(ze,"href","#transformers.UMT5EncoderModel"),l(ae,"class","relative group"),l(wt,"href","https://arxiv.org/abs/1910.10683"),l(wt,"rel","nofollow"),l(po,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),l($t,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l($t,"rel","nofollow"),l(uo,"href","/docs/transformers/main/en/model_doc/umt5#transformers.UMT5EncoderModel"),l(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(qe,"id","transformers.UMT5ForSequenceClassification"),l(qe,"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"),l(qe,"href","#transformers.UMT5ForSequenceClassification"),l(ie,"class","relative group"),l(qt,"href","https://arxiv.org/abs/1910.10683"),l(qt,"rel","nofollow"),l(mo,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),l(jt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(jt,"rel","nofollow"),l(fo,"href","/docs/transformers/main/en/model_doc/umt5#transformers.UMT5ForSequenceClassification"),l(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Je,"id","transformers.UMT5ForQuestionAnswering"),l(Je,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Je,"href","#transformers.UMT5ForQuestionAnswering"),l(le,"class","relative group"),l(Nt,"href","https://arxiv.org/abs/1910.10683"),l(Nt,"rel","nofollow"),l(go,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),l(Gt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(Gt,"rel","nofollow"),l(_o,"href","/docs/transformers/main/en/model_doc/umt5#transformers.UMT5ForQuestionAnswering"),l(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,m){e(document.head,c),g(t,b,m),g(t,_,m),e(_,f),e(f,T),v(d,T,null),e(_,u),e(_,z),e(z,vs),g(t,Mn,m),g(t,H,m),e(H,Ht),e(Ht,Ot),e(H,ws),e(H,Qt),e(Qt,Dt),g(t,vn,m),g(t,O,m),e(O,pe),e(pe,qo),v(We,qo,null),e(O,ks),e(O,Co),e(Co,Us),g(t,wn,m),g(t,ue,m),e(ue,$s),e(ue,Re),e(Re,zs),e(ue,Fs),g(t,kn,m),g(t,Yt,m),e(Yt,xs),g(t,Un,m),g(t,Kt,m),e(Kt,Jo),e(Jo,Es),g(t,$n,m),g(t,eo,m),e(eo,qs),g(t,zn,m),g(t,me,m),e(me,Ge),e(Ge,Cs),e(Ge,Ve),e(Ve,Js),e(Ge,js),e(me,Is),e(me,jo),e(jo,Ss),g(t,Fn,m),g(t,to,m),e(to,Zs),g(t,xn,m),g(t,S,m),e(S,Io),e(Io,Pe),e(Pe,As),e(S,Ns),e(S,So),e(So,Xe),e(Xe,Ws),e(S,Rs),e(S,Zo),e(Zo,Be),e(Be,Gs),e(S,Vs),e(S,oo),e(oo,Le),e(Le,Ps),e(oo,Xs),g(t,En,m),g(t,Z,m),e(Z,Bs),e(Z,He),e(He,Ls),e(Z,Hs),e(Z,Oe),e(Oe,Os),e(Z,Qs),e(Z,Qe),e(Qe,Ds),e(Z,Ys),g(t,qn,m),g(t,fe,m),e(fe,Ks),e(fe,no),e(no,ea),e(fe,ta),g(t,Cn,m),g(t,Q,m),e(Q,ge),e(ge,Ao),v(De,Ao,null),e(Q,oa),e(Q,No),e(No,na),g(t,Jn,m),g(t,D,m),e(D,_e),e(_e,Wo),v(Ye,Wo,null),e(D,sa),e(D,Ro),e(Ro,aa),g(t,jn,m),v(Ke,t,m),g(t,In,m),g(t,Y,m),e(Y,Te),e(Te,Go),v(et,Go,null),e(Y,ra),e(Y,Vo),e(Vo,ia),g(t,Sn,m),g(t,V,m),v(tt,V,null),e(V,da),e(V,K),e(K,la),e(K,so),e(so,ca),e(K,ha),e(K,ot),e(ot,pa),e(K,ua),e(V,ma),e(V,ee),e(ee,fa),e(ee,ao),e(ao,ga),e(ee,_a),e(ee,ro),e(ro,Ta),e(ee,ba),g(t,Zn,m),g(t,te,m),e(te,be),e(be,Po),v(nt,Po,null),e(te,ya),e(te,Xo),e(Xo,Ma),g(t,An,m),g(t,F,m),v(st,F,null),e(F,va),e(F,Bo),e(Bo,wa),e(F,ka),e(F,at),e(at,Ua),e(at,rt),e(rt,$a),e(at,za),e(F,Fa),e(F,it),e(it,xa),e(it,io),e(io,Ea),e(it,qa),e(F,Ca),e(F,dt),e(dt,Ja),e(dt,lt),e(lt,ja),e(dt,Ia),e(F,Sa),v(ye,F,null),e(F,Za),e(F,A),v(ct,A,null),e(A,Aa),e(A,oe),e(oe,Na),e(oe,lo),e(lo,Wa),e(oe,Ra),e(oe,Lo),e(Lo,Ga),e(oe,Va),e(A,Pa),v(Me,A,null),e(A,Xa),v(ve,A,null),g(t,Nn,m),g(t,ne,m),e(ne,we),e(we,Ho),v(ht,Ho,null),e(ne,Ba),e(ne,Oo),e(Oo,La),g(t,Wn,m),g(t,x,m),v(pt,x,null),e(x,Ha),e(x,ut),e(ut,Oa),e(ut,Qo),e(Qo,Qa),e(ut,Da),e(x,Ya),e(x,mt),e(mt,Ka),e(mt,ft),e(ft,er),e(mt,tr),e(x,or),e(x,gt),e(gt,nr),e(gt,co),e(co,sr),e(gt,ar),e(x,rr),e(x,_t),e(_t,ir),e(_t,Tt),e(Tt,dr),e(_t,lr),e(x,cr),v(ke,x,null),e(x,hr),e(x,N),v(bt,N,null),e(N,pr),e(N,se),e(se,ur),e(se,ho),e(ho,mr),e(se,fr),e(se,Do),e(Do,gr),e(se,_r),e(N,Tr),v(Ue,N,null),e(N,br),v($e,N,null),g(t,Rn,m),g(t,ae,m),e(ae,ze),e(ze,Yo),v(yt,Yo,null),e(ae,yr),e(ae,Ko),e(Ko,Mr),g(t,Gn,m),g(t,E,m),v(Mt,E,null),e(E,vr),e(E,en),e(en,wr),e(E,kr),e(E,vt),e(vt,Ur),e(vt,wt),e(wt,$r),e(vt,zr),e(E,Fr),e(E,kt),e(kt,xr),e(kt,po),e(po,Er),e(kt,qr),e(E,Cr),e(E,Ut),e(Ut,Jr),e(Ut,$t),e($t,jr),e(Ut,Ir),e(E,Sr),v(Fe,E,null),e(E,Zr),e(E,W),v(zt,W,null),e(W,Ar),e(W,re),e(re,Nr),e(re,uo),e(uo,Wr),e(re,Rr),e(re,tn),e(tn,Gr),e(re,Vr),e(W,Pr),v(xe,W,null),e(W,Xr),v(Ee,W,null),g(t,Vn,m),g(t,ie,m),e(ie,qe),e(qe,on),v(Ft,on,null),e(ie,Br),e(ie,nn),e(nn,Lr),g(t,Pn,m),g(t,q,m),v(xt,q,null),e(q,Hr),e(q,sn),e(sn,Or),e(q,Qr),e(q,Et),e(Et,Dr),e(Et,qt),e(qt,Yr),e(Et,Kr),e(q,ei),e(q,Ct),e(Ct,ti),e(Ct,mo),e(mo,oi),e(Ct,ni),e(q,si),e(q,Jt),e(Jt,ai),e(Jt,jt),e(jt,ri),e(Jt,ii),e(q,di),e(q,X),v(It,X,null),e(X,li),e(X,de),e(de,ci),e(de,fo),e(fo,hi),e(de,pi),e(de,an),e(an,ui),e(de,mi),e(X,fi),v(Ce,X,null),g(t,Xn,m),g(t,le,m),e(le,Je),e(Je,rn),v(St,rn,null),e(le,gi),e(le,dn),e(dn,_i),g(t,Bn,m),g(t,C,m),v(Zt,C,null),e(C,Ti),e(C,ce),e(ce,bi),e(ce,ln),e(ln,yi),e(ce,Mi),e(ce,cn),e(cn,vi),e(ce,wi),e(C,ki),e(C,At),e(At,Ui),e(At,Nt),e(Nt,$i),e(At,zi),e(C,Fi),e(C,Wt),e(Wt,xi),e(Wt,go),e(go,Ei),e(Wt,qi),e(C,Ci),e(C,Rt),e(Rt,Ji),e(Rt,Gt),e(Gt,ji),e(Rt,Ii),e(C,Si),e(C,B),v(Vt,B,null),e(B,Zi),e(B,he),e(he,Ai),e(he,_o),e(_o,Ni),e(he,Wi),e(he,hn),e(hn,Ri),e(he,Gi),e(B,Vi),v(je,B,null),Ln=!0},p(t,[m]){const Pt={};m&2&&(Pt.$$scope={dirty:m,ctx:t}),ye.$set(Pt);const pn={};m&2&&(pn.$$scope={dirty:m,ctx:t}),Me.$set(pn);const un={};m&2&&(un.$$scope={dirty:m,ctx:t}),ve.$set(un);const mn={};m&2&&(mn.$$scope={dirty:m,ctx:t}),ke.$set(mn);const Xt={};m&2&&(Xt.$$scope={dirty:m,ctx:t}),Ue.$set(Xt);const fn={};m&2&&(fn.$$scope={dirty:m,ctx:t}),$e.$set(fn);const gn={};m&2&&(gn.$$scope={dirty:m,ctx:t}),Fe.$set(gn);const Bt={};m&2&&(Bt.$$scope={dirty:m,ctx:t}),xe.$set(Bt);const _n={};m&2&&(_n.$$scope={dirty:m,ctx:t}),Ee.$set(_n);const Tn={};m&2&&(Tn.$$scope={dirty:m,ctx:t}),Ce.$set(Tn);const bn={};m&2&&(bn.$$scope={dirty:m,ctx:t}),je.$set(bn)},i(t){Ln||(w(d.$$.fragment,t),w(We.$$.fragment,t),w(De.$$.fragment,t),w(Ye.$$.fragment,t),w(Ke.$$.fragment,t),w(et.$$.fragment,t),w(tt.$$.fragment,t),w(nt.$$.fragment,t),w(st.$$.fragment,t),w(ye.$$.fragment,t),w(ct.$$.fragment,t),w(Me.$$.fragment,t),w(ve.$$.fragment,t),w(ht.$$.fragment,t),w(pt.$$.fragment,t),w(ke.$$.fragment,t),w(bt.$$.fragment,t),w(Ue.$$.fragment,t),w($e.$$.fragment,t),w(yt.$$.fragment,t),w(Mt.$$.fragment,t),w(Fe.$$.fragment,t),w(zt.$$.fragment,t),w(xe.$$.fragment,t),w(Ee.$$.fragment,t),w(Ft.$$.fragment,t),w(xt.$$.fragment,t),w(It.$$.fragment,t),w(Ce.$$.fragment,t),w(St.$$.fragment,t),w(Zt.$$.fragment,t),w(Vt.$$.fragment,t),w(je.$$.fragment,t),Ln=!0)},o(t){k(d.$$.fragment,t),k(We.$$.fragment,t),k(De.$$.fragment,t),k(Ye.$$.fragment,t),k(Ke.$$.fragment,t),k(et.$$.fragment,t),k(tt.$$.fragment,t),k(nt.$$.fragment,t),k(st.$$.fragment,t),k(ye.$$.fragment,t),k(ct.$$.fragment,t),k(Me.$$.fragment,t),k(ve.$$.fragment,t),k(ht.$$.fragment,t),k(pt.$$.fragment,t),k(ke.$$.fragment,t),k(bt.$$.fragment,t),k(Ue.$$.fragment,t),k($e.$$.fragment,t),k(yt.$$.fragment,t),k(Mt.$$.fragment,t),k(Fe.$$.fragment,t),k(zt.$$.fragment,t),k(xe.$$.fragment,t),k(Ee.$$.fragment,t),k(Ft.$$.fragment,t),k(xt.$$.fragment,t),k(It.$$.fragment,t),k(Ce.$$.fragment,t),k(St.$$.fragment,t),k(Zt.$$.fragment,t),k(Vt.$$.fragment,t),k(je.$$.fragment,t),Ln=!1},d(t){o(c),t&&o(b),t&&o(_),U(d),t&&o(Mn),t&&o(H),t&&o(vn),t&&o(O),U(We),t&&o(wn),t&&o(ue),t&&o(kn),t&&o(Yt),t&&o(Un),t&&o(Kt),t&&o($n),t&&o(eo),t&&o(zn),t&&o(me),t&&o(Fn),t&&o(to),t&&o(xn),t&&o(S),t&&o(En),t&&o(Z),t&&o(qn),t&&o(fe),t&&o(Cn),t&&o(Q),U(De),t&&o(Jn),t&&o(D),U(Ye),t&&o(jn),U(Ke,t),t&&o(In),t&&o(Y),U(et),t&&o(Sn),t&&o(V),U(tt),t&&o(Zn),t&&o(te),U(nt),t&&o(An),t&&o(F),U(st),U(ye),U(ct),U(Me),U(ve),t&&o(Nn),t&&o(ne),U(ht),t&&o(Wn),t&&o(x),U(pt),U(ke),U(bt),U(Ue),U($e),t&&o(Rn),t&&o(ae),U(yt),t&&o(Gn),t&&o(E),U(Mt),U(Fe),U(zt),U(xe),U(Ee),t&&o(Vn),t&&o(ie),U(Ft),t&&o(Pn),t&&o(q),U(xt),U(It),U(Ce),t&&o(Xn),t&&o(le),U(St),t&&o(Bn),t&&o(C),U(Zt),U(Vt),U(je)}}}const Il={local:"sample-usage",sections:[{local:"transformers.UMT5Config",title:"UMT5Config"},{local:"transformers.UMT5Model",title:"UMT5Model"},{local:"transformers.UMT5ForConditionalGeneration",title:"UMT5ForConditionalGeneration"},{local:"transformers.UMT5EncoderModel",title:"UMT5EncoderModel"},{local:"transformers.UMT5ForSequenceClassification",title:"UMT5ForSequenceClassification"},{local:"transformers.UMT5ForQuestionAnswering",title:"UMT5ForQuestionAnswering"}],title:"Sample usage"};function Sl($){return vl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Vl extends Tl{constructor(c){super();bl(this,c,Sl,jl,yl,{})}}export{Vl as default,Il as metadata};
