import{s as js,A as Cs,o as qs,n as ge}from"../chunks/scheduler.01eeda35.js";import{S as Ls,i as Js,g as r,s as o,r as h,A as Fs,h as i,f as s,c as n,j as w,u,x as c,k as T,y as t,a as l,v as g,d as f,t as _,w as b}from"../chunks/index.6dd51b66.js";import{T as St}from"../chunks/Tip.de9bae2b.js";import{D as U}from"../chunks/Docstring.cb556860.js";import{C as At}from"../chunks/CodeBlock.19ec9b8c.js";import{E as In}from"../chunks/ExampleCodeBlock.69db56ad.js";import{H as W,E as Is}from"../chunks/index.58fe8f9d.js";function Ns(j){let d,k="This method is deprecated, <code>__call__</code> should be used instead.";return{c(){d=r("p"),d.innerHTML=k},l(p){d=i(p,"P",{"data-svelte-h":!0}),c(d)!=="svelte-1phrc72"&&(d.innerHTML=k)},m(p,y){l(p,d,y)},p:ge,d(p){p&&s(d)}}}function Bs(j){let d,k="This method is deprecated, <code>__call__</code> should be used instead.";return{c(){d=r("p"),d.innerHTML=k},l(p){d=i(p,"P",{"data-svelte-h":!0}),c(d)!=="svelte-1phrc72"&&(d.innerHTML=k)},m(p,y){l(p,d,y)},p:ge,d(p){p&&s(d)}}}function Gs(j){let d,k=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){d=r("p"),d.innerHTML=k},l(p){d=i(p,"P",{"data-svelte-h":!0}),c(d)!=="svelte-fincs2"&&(d.innerHTML=k)},m(p,y){l(p,d,y)},p:ge,d(p){p&&s(d)}}}function Ps(j){let d,k="Example:",p,y,x;return y=new At({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBBdXRvTW9kZWwlMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQSUyMyUyMGxvYWQlMjBtb2RlbCUyMGFuZCUyMHByb2Nlc3NvciUwQSUyMyUyMGluJTIwdGhpcyUyMGNhc2UlMkMlMjB3ZSUyMGFscmVhZHklMjBoYXZlJTIwcGVyZm9ybWVkJTIwT0NSJTIwb3Vyc2VsdmVzJTBBJTIzJTIwc28lMjB3ZSUyMGluaXRpYWxpemUlMjB0aGUlMjBwcm9jZXNzb3IlMjB3aXRoJTIwJTYwYXBwbHlfb2NyJTNERmFsc2UlNjAlMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZ1ZG9wLWxhcmdlJTIyJTJDJTIwYXBwbHlfb2NyJTNERmFsc2UpJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRnVkb3AtbGFyZ2UlMjIpJTBBJTBBJTIzJTIwbG9hZCUyMGFuJTIwZXhhbXBsZSUyMGltYWdlJTJDJTIwYWxvbmclMjB3aXRoJTIwdGhlJTIwd29yZHMlMjBhbmQlMjBjb29yZGluYXRlcyUwQSUyMyUyMHdoaWNoJTIwd2VyZSUyMGV4dHJhY3RlZCUyMHVzaW5nJTIwYW4lMjBPQ1IlMjBlbmdpbmUlMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMm5pZWxzciUyRmZ1bnNkLWxheW91dGxtdjMlMjIlMkMlMjBzcGxpdCUzRCUyMnRyYWluJTIyJTJDJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlKSUwQWV4YW1wbGUlMjAlM0QlMjBkYXRhc2V0JTVCMCU1RCUwQWltYWdlJTIwJTNEJTIwZXhhbXBsZSU1QiUyMmltYWdlJTIyJTVEJTBBd29yZHMlMjAlM0QlMjBleGFtcGxlJTVCJTIydG9rZW5zJTIyJTVEJTBBYm94ZXMlMjAlM0QlMjBleGFtcGxlJTVCJTIyYmJveGVzJTIyJTVEJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlJTJDJTIwd29yZHMlMkMlMjBib3hlcyUzRGJveGVzJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEFkZWNvZGVyX2lucHV0X2lkcyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIlNUJtb2RlbC5jb25maWcuZGVjb2Rlcl9zdGFydF90b2tlbl9pZCU1RCU1RCklMEElMEElMjMlMjBmb3J3YXJkJTIwcGFzcyUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGRlY29kZXJfaW5wdXRfaWRzJTNEZGVjb2Rlcl9pbnB1dF9pZHMpJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQWxpc3QobGFzdF9oaWRkZW5fc3RhdGVzLnNoYXBlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, AutoModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># load model and processor</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># in this case, we already have performed OCR ourselves</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># so we initialize the processor with \`apply_ocr=False\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/udop-large&quot;</span>, apply_ocr=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModel.from_pretrained(<span class="hljs-string">&quot;microsoft/udop-large&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># load an example image, along with the words and coordinates</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># which were extracted using an OCR engine</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;nielsr/funsd-layoutlmv3&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>, trust_remote_code=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example = dataset[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image = example[<span class="hljs-string">&quot;image&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>words = example[<span class="hljs-string">&quot;tokens&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>boxes = example[<span class="hljs-string">&quot;bboxes&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(image, words, boxes=boxes, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_input_ids = torch.tensor([[model.config.decoder_start_token_id]])

<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(**inputs, decoder_input_ids=decoder_input_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1024</span>]`,wrap:!1}}),{c(){d=r("p"),d.textContent=k,p=o(),h(y.$$.fragment)},l(m){d=i(m,"P",{"data-svelte-h":!0}),c(d)!=="svelte-11lpom8"&&(d.textContent=k),p=n(m),u(y.$$.fragment,m)},m(m,z){l(m,d,z),l(m,p,z),g(y,m,z),x=!0},p:ge,i(m){x||(f(y.$$.fragment,m),x=!0)},o(m){_(y.$$.fragment,m),x=!1},d(m){m&&(s(d),s(p)),b(y,m)}}}function Zs(j){let d,k=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){d=r("p"),d.innerHTML=k},l(p){d=i(p,"P",{"data-svelte-h":!0}),c(d)!=="svelte-fincs2"&&(d.innerHTML=k)},m(p,y){l(p,d,y)},p:ge,d(p){p&&s(d)}}}function Ws(j){let d,k="Examples:",p,y,x;return y=new At({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBVZG9wRm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBJTIzJTIwbG9hZCUyMG1vZGVsJTIwYW5kJTIwcHJvY2Vzc29yJTBBJTIzJTIwaW4lMjB0aGlzJTIwY2FzZSUyQyUyMHdlJTIwYWxyZWFkeSUyMGhhdmUlMjBwZXJmb3JtZWQlMjBPQ1IlMjBvdXJzZWx2ZXMlMEElMjMlMjBzbyUyMHdlJTIwaW5pdGlhbGl6ZSUyMHRoZSUyMHByb2Nlc3NvciUyMHdpdGglMjAlNjBhcHBseV9vY3IlM0RGYWxzZSU2MCUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRnVkb3AtbGFyZ2UlMjIlMkMlMjBhcHBseV9vY3IlM0RGYWxzZSklMEFtb2RlbCUyMCUzRCUyMFVkb3BGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRnVkb3AtbGFyZ2UlMjIpJTBBJTBBJTIzJTIwbG9hZCUyMGFuJTIwZXhhbXBsZSUyMGltYWdlJTJDJTIwYWxvbmclMjB3aXRoJTIwdGhlJTIwd29yZHMlMjBhbmQlMjBjb29yZGluYXRlcyUwQSUyMyUyMHdoaWNoJTIwd2VyZSUyMGV4dHJhY3RlZCUyMHVzaW5nJTIwYW4lMjBPQ1IlMjBlbmdpbmUlMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMm5pZWxzciUyRmZ1bnNkLWxheW91dGxtdjMlMjIlMkMlMjBzcGxpdCUzRCUyMnRyYWluJTIyJTJDJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlKSUwQWV4YW1wbGUlMjAlM0QlMjBkYXRhc2V0JTVCMCU1RCUwQWltYWdlJTIwJTNEJTIwZXhhbXBsZSU1QiUyMmltYWdlJTIyJTVEJTBBd29yZHMlMjAlM0QlMjBleGFtcGxlJTVCJTIydG9rZW5zJTIyJTVEJTBBYm94ZXMlMjAlM0QlMjBleGFtcGxlJTVCJTIyYmJveGVzJTIyJTVEJTBBJTBBJTIzJTIwb25lJTIwY2FuJTIwdXNlJTIwdGhlJTIwdmFyaW91cyUyMHRhc2slMjBwcmVmaXhlcyUyMChwcm9tcHRzKSUyMHVzZWQlMjBkdXJpbmclMjBwcmUtdHJhaW5pbmclMEElMjMlMjBlLmcuJTIwdGhlJTIwdGFzayUyMHByZWZpeCUyMGZvciUyMERvY1ZRQSUyMGlzJTIwJTIyUXVlc3Rpb24lMjBhbnN3ZXJpbmcuJTIwJTIyJTBBcXVlc3Rpb24lMjAlM0QlMjAlMjJRdWVzdGlvbiUyMGFuc3dlcmluZy4lMjBXaGF0JTIwaXMlMjB0aGUlMjBkYXRlJTIwb24lMjB0aGUlMjBmb3JtJTNGJTIyJTBBZW5jb2RpbmclMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2UlMkMlMjBxdWVzdGlvbiUyQyUyMHRleHRfcGFpciUzRHdvcmRzJTJDJTIwYm94ZXMlM0Rib3hlcyUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBJTIzJTIwYXV0b3JlZ3Jlc3NpdmUlMjBnZW5lcmF0aW9uJTBBcHJlZGljdGVkX2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqZW5jb2RpbmcpJTBBcHJpbnQocHJvY2Vzc29yLmJhdGNoX2RlY29kZShwcmVkaWN0ZWRfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpJTVCMCU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, UdopForConditionalGeneration
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># load model and processor</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># in this case, we already have performed OCR ourselves</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># so we initialize the processor with \`apply_ocr=False\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/udop-large&quot;</span>, apply_ocr=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = UdopForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;microsoft/udop-large&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># load an example image, along with the words and coordinates</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># which were extracted using an OCR engine</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;nielsr/funsd-layoutlmv3&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>, trust_remote_code=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example = dataset[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image = example[<span class="hljs-string">&quot;image&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>words = example[<span class="hljs-string">&quot;tokens&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>boxes = example[<span class="hljs-string">&quot;bboxes&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># one can use the various task prefixes (prompts) used during pre-training</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># e.g. the task prefix for DocVQA is &quot;Question answering. &quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>question = <span class="hljs-string">&quot;Question answering. What is the date on the form?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(image, question, text_pair=words, boxes=boxes, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># autoregressive generation</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_ids = model.generate(**encoding)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(processor.batch_decode(predicted_ids, skip_special_tokens=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>])
<span class="hljs-number">9</span>/<span class="hljs-number">30</span>/<span class="hljs-number">92</span>`,wrap:!1}}),{c(){d=r("p"),d.textContent=k,p=o(),h(y.$$.fragment)},l(m){d=i(m,"P",{"data-svelte-h":!0}),c(d)!=="svelte-kvfsh7"&&(d.textContent=k),p=n(m),u(y.$$.fragment,m)},m(m,z){l(m,d,z),l(m,p,z),g(y,m,z),x=!0},p:ge,i(m){x||(f(y.$$.fragment,m),x=!0)},o(m){_(y.$$.fragment,m),x=!1},d(m){m&&(s(d),s(p)),b(y,m)}}}function Rs(j){let d,k=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){d=r("p"),d.innerHTML=k},l(p){d=i(p,"P",{"data-svelte-h":!0}),c(d)!=="svelte-fincs2"&&(d.innerHTML=k)},m(p,y){l(p,d,y)},p:ge,d(p){p&&s(d)}}}function Hs(j){let d,k="Example:",p,y,x;return y=new At({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBVZG9wRW5jb2Rlck1vZGVsJTBBZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGhmX2h1Yl9kb3dubG9hZCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQSUyMyUyMGxvYWQlMjBtb2RlbCUyMGFuZCUyMHByb2Nlc3NvciUwQSUyMyUyMGluJTIwdGhpcyUyMGNhc2UlMkMlMjB3ZSUyMGFscmVhZHklMjBoYXZlJTIwcGVyZm9ybWVkJTIwT0NSJTIwb3Vyc2VsdmVzJTBBJTIzJTIwc28lMjB3ZSUyMGluaXRpYWxpemUlMjB0aGUlMjBwcm9jZXNzb3IlMjB3aXRoJTIwJTYwYXBwbHlfb2NyJTNERmFsc2UlNjAlMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZ1ZG9wLWxhcmdlJTIyJTJDJTIwYXBwbHlfb2NyJTNERmFsc2UpJTBBbW9kZWwlMjAlM0QlMjBVZG9wRW5jb2Rlck1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZ1ZG9wLWxhcmdlJTIyKSUwQSUwQSUyMyUyMGxvYWQlMjBhbiUyMGV4YW1wbGUlMjBpbWFnZSUyQyUyMGFsb25nJTIwd2l0aCUyMHRoZSUyMHdvcmRzJTIwYW5kJTIwY29vcmRpbmF0ZXMlMEElMjMlMjB3aGljaCUyMHdlcmUlMjBleHRyYWN0ZWQlMjB1c2luZyUyMGFuJTIwT0NSJTIwZW5naW5lJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJuaWVsc3IlMkZmdW5zZC1sYXlvdXRsbXYzJTIyJTJDJTIwc3BsaXQlM0QlMjJ0cmFpbiUyMiUyQyUyMHRydXN0X3JlbW90ZV9jb2RlJTNEVHJ1ZSklMEFleGFtcGxlJTIwJTNEJTIwZGF0YXNldCU1QjAlNUQlMEFpbWFnZSUyMCUzRCUyMGV4YW1wbGUlNUIlMjJpbWFnZSUyMiU1RCUwQXdvcmRzJTIwJTNEJTIwZXhhbXBsZSU1QiUyMnRva2VucyUyMiU1RCUwQWJveGVzJTIwJTNEJTIwZXhhbXBsZSU1QiUyMmJib3hlcyUyMiU1RCUwQWVuY29kaW5nJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlJTJDJTIwd29yZHMlMkMlMjBib3hlcyUzRGJveGVzJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKiplbmNvZGluZyklMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, UdopEncoderModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># load model and processor</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># in this case, we already have performed OCR ourselves</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># so we initialize the processor with \`apply_ocr=False\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/udop-large&quot;</span>, apply_ocr=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = UdopEncoderModel.from_pretrained(<span class="hljs-string">&quot;microsoft/udop-large&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># load an example image, along with the words and coordinates</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># which were extracted using an OCR engine</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;nielsr/funsd-layoutlmv3&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>, trust_remote_code=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example = dataset[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image = example[<span class="hljs-string">&quot;image&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>words = example[<span class="hljs-string">&quot;tokens&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>boxes = example[<span class="hljs-string">&quot;bboxes&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(image, words, boxes=boxes, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`,wrap:!1}}),{c(){d=r("p"),d.textContent=k,p=o(),h(y.$$.fragment)},l(m){d=i(m,"P",{"data-svelte-h":!0}),c(d)!=="svelte-11lpom8"&&(d.textContent=k),p=n(m),u(y.$$.fragment,m)},m(m,z){l(m,d,z),l(m,p,z),g(y,m,z),x=!0},p:ge,i(m){x||(f(y.$$.fragment,m),x=!0)},o(m){_(y.$$.fragment,m),x=!1},d(m){m&&(s(d),s(p)),b(y,m)}}}function Ds(j){let d,k,p,y,x,m,z,Nn='<img alt="PyTorch" src="https://img.shields.io/badge/PyTorch-DE3412?style=flat&amp;logo=pytorch&amp;logoColor=white"/>',Xt,fe,Yt,_e,Bn=`The UDOP model was proposed in <a href="https://arxiv.org/abs/2212.02623" rel="nofollow">Unifying Vision, Text, and Layout for Universal Document Processing</a> by Zineng Tang, Ziyi Yang, Guoxin Wang, Yuwei Fang, Yang Liu, Chenguang Zhu, Michael Zeng, Cha Zhang, Mohit Bansal.
UDOP adopts an encoder-decoder Transformer architecture based on <a href="t5">T5</a> for document AI tasks like document image classification, document parsing and document visual question answering.`,Qt,be,Gn="The abstract from the paper is the following:",Kt,ye,Pn="We propose Universal Document Processing (UDOP), a foundation Document AI model which unifies text, image, and layout modalities together with varied task formats, including document understanding and generation. UDOP leverages the spatial correlation between textual content and document image to model image, text, and layout modalities with one uniform representation. With a novel Vision-Text-Layout Transformer, UDOP unifies pretraining and multi-domain downstream tasks into a prompt-based sequence generation scheme. UDOP is pretrained on both large-scale unlabeled document corpora using innovative self-supervised objectives and diverse labeled data. UDOP also learns to generate document images from text and layout modalities via masked image reconstruction. To the best of our knowledge, this is the first time in the field of document AI that one model simultaneously achieves high-quality neural document editing and content customization. Our method sets the state-of-the-art on 9 Document AI tasks, e.g., document understanding and QA, across diverse data domains like finance reports, academic papers, and websites. UDOP ranks first on the leaderboard of the Document Understanding Benchmark (DUE).*",eo,X,Zn,to,ke,Wn='UDOP architecture. Taken from the <a href="https://arxiv.org/abs/2212.02623">original paper.</a>',oo,Te,no,ve,Rn=`<li>In addition to <em>input_ids</em>, <a href="/docs/transformers/main/en/model_doc/udop#transformers.UdopForConditionalGeneration">UdopForConditionalGeneration</a> also expects the input <code>bbox</code>, which are
the bounding boxes (i.e. 2D-positions) of the input tokens. These can be obtained using an external OCR engine such
as Google’s <a href="https://github.com/tesseract-ocr/tesseract" rel="nofollow">Tesseract</a> (there’s a <a href="https://pypi.org/project/pytesseract/" rel="nofollow">Python wrapper</a> available). Each bounding box should be in (x0, y0, x1, y1) format, where (x0, y0) corresponds to the position of the upper left corner in the bounding box, and (x1, y1) represents the
position of the lower right corner. Note that one first needs to normalize the bounding boxes to be on a 0-1000
scale. To normalize, you can use the following function:</li>`,so,we,ao,xe,Hn=`Here, <code>width</code> and <code>height</code> correspond to the width and height of the original document in which the token
occurs. Those can be obtained using the Python Image Library (PIL) library for example, as follows:`,ro,Me,io,Ue,Dn='One can use <a href="/docs/transformers/main/en/model_doc/udop#transformers.UdopProcessor">UdopProcessor</a> to prepare images and text for the model, which takes care of all of this. By default, this class uses the Tesseract engine to extract a list of words and boxes (coordinates) from a given document. Its functionality is equivalent to that of <a href="/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3Processor">LayoutLMv3Processor</a>, hence it supports passing either <code>apply_ocr=False</code> in case you prefer to use your own OCR engine or <code>apply_ocr=True</code> in case you want the default OCR engine to be used. Refer to the <a href="layoutlmv2#usage-layoutlmv2processor">usage guide of LayoutLMv2</a> regarding all possible use cases (the functionality of <code>UdopProcessor</code> is identical).',lo,ze,En='<li>If using an own OCR engine of choice, one recommendation is Azure’s <a href="https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/call-read-api" rel="nofollow">Read API</a>, which supports so-called line segments. Use of segment position embeddings typically results in better performance.</li> <li>At inference time, it’s recommended to use the <code>generate</code> method to autoregressively generate text given a document image.</li> <li>The model has been pre-trained on both self-supervised and supervised objectives. One can use the various task prefixes (prompts) used during pre-training to test out the out-of-the-box capabilities. For instance, the model can be prompted with “Question answering. What is the date?”, as “Question answering.” is the task prefix used during pre-training for DocVQA. Refer to the <a href="https://arxiv.org/abs/2212.02623" rel="nofollow">paper</a> (table 1) for all task prefixes.</li> <li>One can also fine-tune <a href="/docs/transformers/main/en/model_doc/udop#transformers.UdopEncoderModel">UdopEncoderModel</a>, which is the encoder-only part of UDOP, which can be seen as a LayoutLMv3-like Transformer encoder. For discriminative tasks, one can just add a linear classifier on top of it and fine-tune it on a labeled dataset.</li>',co,$e,On=`This model was contributed by <a href="https://huggingface.co/nielsr" rel="nofollow">nielsr</a>.
The original code can be found <a href="https://github.com/microsoft/UDOP" rel="nofollow">here</a>.`,po,je,mo,Ce,Vn=`A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with UDOP. If
you’re interested in submitting a resource to be included here, please feel free to open a Pull Request and we’ll
review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.`,ho,qe,Sn=`<li>Demo notebooks regarding UDOP can be found <a href="https://github.com/NielsRogge/Transformers-Tutorials/tree/master/UDOP" rel="nofollow">here</a> that show how
to fine-tune UDOP on a custom dataset as well as inference. 🌎</li> <li><a href="../tasks/document_question_answering">Document question answering task guide</a></li>`,uo,Le,go,Z,Je,Jo,lt,An=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/udop#transformers.UdopForConditionalGeneration">UdopForConditionalGeneration</a>. It is used to
instantiate a UDOP 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 UDOP
<a href="https://huggingface.co/microsoft/udop-large" rel="nofollow">microsoft/udop-large</a> architecture.`,Fo,ct,Xn=`Configuration objects inherit from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,fo,Fe,_o,$,Ie,Io,pt,Yn=`Adapted from <a href="/docs/transformers/main/en/model_doc/layoutxlm#transformers.LayoutXLMTokenizer">LayoutXLMTokenizer</a> and <a href="/docs/transformers/main/en/model_doc/t5#transformers.T5Tokenizer">T5Tokenizer</a>. Based on
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a>.`,No,mt,Qn=`This tokenizer inherits from <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a> which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`,Bo,R,Ne,Go,ht,Kn=`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A sequence has the following format:`,Po,ut,es="<li>single sequence: <code>X &lt;/s&gt;</code></li> <li>pair of sequences: <code>A &lt;/s&gt; B &lt;/s&gt;</code></li>",Zo,Y,Be,Wo,gt,ts=`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer <code>prepare_for_model</code> method.`,Ro,Q,Ge,Ho,ft,os=`Create a mask from the two sequences passed to be used in a sequence-pair classification task. T5 does not make
use of token type ids, therefore a list of zeros is returned.`,Do,_t,Pe,bo,Ze,yo,v,We,Eo,bt,ns=`Construct a “fast” UDOP tokenizer (backed by HuggingFace’s <em>tokenizers</em> library). Adapted from
<a href="/docs/transformers/main/en/model_doc/layoutxlm#transformers.LayoutXLMTokenizer">LayoutXLMTokenizer</a> and <a href="/docs/transformers/main/en/model_doc/t5#transformers.T5Tokenizer">T5Tokenizer</a>. Based on
<a href="https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=BPE#models" rel="nofollow">BPE</a>.`,Oo,yt,ss=`This tokenizer inherits from <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a> which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`,Vo,H,Re,So,kt,as="Tokenize and prepare for the model a list of sequences or a list of pairs of sequences.",Ao,K,Xo,D,He,Yo,Tt,rs=`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLM-RoBERTa sequence has the following format:`,Qo,vt,is="<li>single sequence: <code>&lt;s&gt; X &lt;/s&gt;</code></li> <li>pair of sequences: <code>&lt;s&gt; A &lt;/s&gt;&lt;/s&gt; B &lt;/s&gt;</code></li>",Ko,ee,De,en,wt,ds=`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences with word-level normalized bounding boxes and optional labels.`,tn,te,Ee,on,xt,ls=`Create a mask from the two sequences passed to be used in a sequence-pair classification task. XLM-RoBERTa does
not make use of token type ids, therefore a list of zeros is returned.`,nn,Mt,Oe,sn,E,Ve,an,Ut,cs="Tokenize and prepare for the model a sequence or a pair of sequences.",rn,oe,ko,Se,To,C,Ae,dn,zt,ps="Constructs a UDOP processor which combines a LayoutLMv3 image processor and a UDOP tokenizer into a single processor.",ln,$t,ms='<a href="/docs/transformers/main/en/model_doc/udop#transformers.UdopProcessor">UdopProcessor</a> offers all the functionalities you need to prepare data for the model.',cn,jt,hs=`It first uses <a href="/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3ImageProcessor">LayoutLMv3ImageProcessor</a> to resize, rescale and normalize document images, and optionally applies OCR
to get words and normalized bounding boxes. These are then provided to <a href="/docs/transformers/main/en/model_doc/udop#transformers.UdopTokenizer">UdopTokenizer</a> or <a href="/docs/transformers/main/en/model_doc/udop#transformers.UdopTokenizerFast">UdopTokenizerFast</a>,
which turns the words and bounding boxes into token-level <code>input_ids</code>, <code>attention_mask</code>, <code>token_type_ids</code>, <code>bbox</code>.
Optionally, one can provide integer <code>word_labels</code>, which are turned into token-level <code>labels</code> for token
classification tasks (such as FUNSD, CORD).`,pn,Ct,us=`Additionally, it also supports passing <code>text_target</code> and <code>text_pair_target</code> to the tokenizer, which can be used to
prepare labels for language modeling tasks.`,mn,I,Xe,hn,qt,gs=`This method first forwards the <code>images</code> argument to <code>~UdopImageProcessor.__call__</code>. In case
<code>UdopImageProcessor</code> was initialized with <code>apply_ocr</code> set to <code>True</code>, it passes the obtained words and
bounding boxes along with the additional arguments to <code>__call__()</code> and returns the output,
together with the prepared <code>pixel_values</code>. In case <code>UdopImageProcessor</code> was initialized with <code>apply_ocr</code> set
to <code>False</code>, it passes the words (<code>text</code>/\`<code>text_pair</code>) and <code>boxes</code> specified by the user along with the
additional arguments to <code>__call__()</code> and returns the output, together with the prepared
<code>pixel_values</code>.`,un,Lt,fs="Alternatively, one can pass <code>text_target</code> and <code>text_pair_target</code> to prepare the targets of UDOP.",gn,Jt,_s="Please refer to the docstring of the above two methods for more information.",vo,Ye,wo,J,Qe,fn,Ft,bs=`The bare UDOP encoder-decoder Transformer outputting raw hidden-states without any specific head on top.
This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. 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.)`,_n,It,ys=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,bn,N,Ke,yn,Nt,ks='The <a href="/docs/transformers/main/en/model_doc/udop#transformers.UdopModel">UdopModel</a> forward method, overrides the <code>__call__</code> special method.',kn,ne,Tn,se,xo,et,Mo,L,tt,vn,Bt,Ts=`The UDOP encoder-decoder Transformer with a language modeling head on top, enabling to generate text given document
images and an optional prompt.`,wn,Gt,vs=`This class is based on <a href="/docs/transformers/main/en/model_doc/t5#transformers.T5ForConditionalGeneration">T5ForConditionalGeneration</a>, extended to deal with images and layout (2D) data.
This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. 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.)`,xn,Pt,ws=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Mn,B,ot,Un,Zt,xs='The <a href="/docs/transformers/main/en/model_doc/udop#transformers.UdopForConditionalGeneration">UdopForConditionalGeneration</a> forward method, overrides the <code>__call__</code> special method.',zn,ae,$n,re,Uo,nt,zo,F,st,jn,Wt,Ms=`The bare UDOP Model transformer outputting encoder’s raw hidden-states without any specific head on top.
This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. 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.)`,Cn,Rt,Us=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,qn,G,at,Ln,Ht,zs='The <a href="/docs/transformers/main/en/model_doc/udop#transformers.UdopEncoderModel">UdopEncoderModel</a> forward method, overrides the <code>__call__</code> special method.',Jn,ie,Fn,de,$o,rt,jo,Ot,Co;return x=new W({props:{title:"UDOP",local:"udop",headingTag:"h1"}}),fe=new W({props:{title:"Overview",local:"overview",headingTag:"h2"}}),Te=new W({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),we=new At({props:{code:"ZGVmJTIwbm9ybWFsaXplX2Jib3goYmJveCUyQyUyMHdpZHRoJTJDJTIwaGVpZ2h0KSUzQSUwQSUyMCUyMCUyMCUyMHJldHVybiUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGludCgxMDAwJTIwKiUyMChiYm94JTVCMCU1RCUyMCUyRiUyMHdpZHRoKSklMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBpbnQoMTAwMCUyMColMjAoYmJveCU1QjElNUQlMjAlMkYlMjBoZWlnaHQpKSUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGludCgxMDAwJTIwKiUyMChiYm94JTVCMiU1RCUyMCUyRiUyMHdpZHRoKSklMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBpbnQoMTAwMCUyMColMjAoYmJveCU1QjMlNUQlMjAlMkYlMjBoZWlnaHQpKSUyQyUwQSUyMCUyMCUyMCUyMCU1RA==",highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">normalize_bbox</span>(<span class="hljs-params">bbox, width, height</span>):
    <span class="hljs-keyword">return</span> [
        <span class="hljs-built_in">int</span>(<span class="hljs-number">1000</span> * (bbox[<span class="hljs-number">0</span>] / width)),
        <span class="hljs-built_in">int</span>(<span class="hljs-number">1000</span> * (bbox[<span class="hljs-number">1</span>] / height)),
        <span class="hljs-built_in">int</span>(<span class="hljs-number">1000</span> * (bbox[<span class="hljs-number">2</span>] / width)),
        <span class="hljs-built_in">int</span>(<span class="hljs-number">1000</span> * (bbox[<span class="hljs-number">3</span>] / height)),
    ]`,wrap:!1}}),Me=new At({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBJTBBJTIzJTIwRG9jdW1lbnQlMjBjYW4lMjBiZSUyMGElMjBwbmclMkMlMjBqcGclMkMlMjBldGMuJTIwUERGcyUyMG11c3QlMjBiZSUyMGNvbnZlcnRlZCUyMHRvJTIwaW1hZ2VzLiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihuYW1lX29mX3lvdXJfZG9jdW1lbnQpLmNvbnZlcnQoJTIyUkdCJTIyKSUwQSUwQXdpZHRoJTJDJTIwaGVpZ2h0JTIwJTNEJTIwaW1hZ2Uuc2l6ZQ==",highlighted:`<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image

<span class="hljs-comment"># Document can be a png, jpg, etc. PDFs must be converted to images.</span>
image = Image.<span class="hljs-built_in">open</span>(name_of_your_document).convert(<span class="hljs-string">&quot;RGB&quot;</span>)

width, height = image.size`,wrap:!1}}),je=new W({props:{title:"Resources",local:"resources",headingTag:"h2"}}),Le=new W({props:{title:"UdopConfig",local:"transformers.UdopConfig",headingTag:"h2"}}),Je=new U({props:{name:"class transformers.UdopConfig",anchor:"transformers.UdopConfig",parameters:[{name:"vocab_size",val:" = 33201"},{name:"d_model",val:" = 1024"},{name:"d_kv",val:" = 64"},{name:"d_ff",val:" = 4096"},{name:"num_layers",val:" = 24"},{name:"num_decoder_layers",val:" = None"},{name:"num_heads",val:" = 16"},{name:"relative_attention_num_buckets",val:" = 32"},{name:"relative_attention_max_distance",val:" = 128"},{name:"relative_bias_args",val:" = [{'type': '1d'}, {'type': 'horizontal'}, {'type': 'vertical'}]"},{name:"dropout_rate",val:" = 0.1"},{name:"layer_norm_epsilon",val:" = 1e-06"},{name:"initializer_factor",val:" = 1.0"},{name:"feed_forward_proj",val:" = 'relu'"},{name:"is_encoder_decoder",val:" = True"},{name:"use_cache",val:" = True"},{name:"pad_token_id",val:" = 0"},{name:"eos_token_id",val:" = 1"},{name:"max_2d_position_embeddings",val:" = 1024"},{name:"image_size",val:" = 224"},{name:"patch_size",val:" = 16"},{name:"num_channels",val:" = 3"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.UdopConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 33201) &#x2014;
Vocabulary size of the UDOP 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/udop#transformers.UdopForConditionalGeneration">UdopForConditionalGeneration</a>.`,name:"vocab_size"},{anchor:"transformers.UdopConfig.d_model",description:`<strong>d_model</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Size of the encoder layers and the pooler layer.`,name:"d_model"},{anchor:"transformers.UdopConfig.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. The <code>inner_dim</code> of the projection layer will
be defined as <code>num_heads * d_kv</code>.`,name:"d_kv"},{anchor:"transformers.UdopConfig.d_ff",description:`<strong>d_ff</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Size of the intermediate feed forward layer in each <code>UdopBlock</code>.`,name:"d_ff"},{anchor:"transformers.UdopConfig.num_layers",description:`<strong>num_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 24) &#x2014;
Number of hidden layers in the Transformer encoder and decoder.`,name:"num_layers"},{anchor:"transformers.UdopConfig.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.UdopConfig.num_heads",description:`<strong>num_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder and decoder.`,name:"num_heads"},{anchor:"transformers.UdopConfig.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.UdopConfig.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.UdopConfig.relative_bias_args",description:`<strong>relative_bias_args</strong> (<code>List[dict]</code>, <em>optional</em>, defaults to <code>[{&apos;type&apos; -- &apos;1d&apos;}, {&apos;type&apos;: &apos;horizontal&apos;}, {&apos;type&apos;: &apos;vertical&apos;}]</code>):
A list of dictionaries containing the arguments for the relative bias layers.`,name:"relative_bias_args"},{anchor:"transformers.UdopConfig.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.UdopConfig.layer_norm_epsilon",description:`<strong>layer_norm_epsilon</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-06) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_epsilon"},{anchor:"transformers.UdopConfig.initializer_factor",description:`<strong>initializer_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
A factor for initializing all weight matrices (should be kept to 1, used internally for initialization
testing).`,name:"initializer_factor"},{anchor:"transformers.UdopConfig.feed_forward_proj",description:`<strong>feed_forward_proj</strong> (<code>string</code>, <em>optional</em>, defaults to <code>&quot;relu&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>. Udopv1.1 uses the
<code>&quot;gated-gelu&quot;</code> feed forward projection. Original Udop uses <code>&quot;relu&quot;</code>.`,name:"feed_forward_proj"},{anchor:"transformers.UdopConfig.is_encoder_decoder",description:`<strong>is_encoder_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the model should behave as an encoder/decoder or not.`,name:"is_encoder_decoder"},{anchor:"transformers.UdopConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models).`,name:"use_cache"},{anchor:"transformers.UdopConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The id of the padding token in the vocabulary.`,name:"pad_token_id"},{anchor:"transformers.UdopConfig.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The id of the end-of-sequence token in the vocabulary.`,name:"eos_token_id"},{anchor:"transformers.UdopConfig.max_2d_position_embeddings",description:`<strong>max_2d_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
The maximum absolute position embeddings for relative position encoding.`,name:"max_2d_position_embeddings"},{anchor:"transformers.UdopConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The size of the input images.`,name:"image_size"},{anchor:"transformers.UdopConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The patch size used by the vision encoder.`,name:"patch_size"},{anchor:"transformers.UdopConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The number of channels in the input images.`,name:"num_channels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/udop/configuration_udop.py#L24"}}),Fe=new W({props:{title:"UdopTokenizer",local:"transformers.UdopTokenizer",headingTag:"h2"}}),Ie=new U({props:{name:"class transformers.UdopTokenizer",anchor:"transformers.UdopTokenizer",parameters:[{name:"vocab_file",val:""},{name:"eos_token",val:" = '</s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"sep_token",val:" = '</s>'"},{name:"pad_token",val:" = '<pad>'"},{name:"sep_token_box",val:" = [1000, 1000, 1000, 1000]"},{name:"pad_token_box",val:" = [0, 0, 0, 0]"},{name:"pad_token_label",val:" = -100"},{name:"only_label_first_subword",val:" = True"},{name:"additional_special_tokens",val:" = None"},{name:"sp_model_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"legacy",val:" = True"},{name:"add_prefix_space",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.UdopTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.UdopTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.UdopTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.UdopTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.UdopTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.UdopTokenizer.sep_token_box",description:`<strong>sep_token_box</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[1000, 1000, 1000, 1000]</code>) &#x2014;
The bounding box to use for the special [SEP] token.`,name:"sep_token_box"},{anchor:"transformers.UdopTokenizer.pad_token_box",description:`<strong>pad_token_box</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[0, 0, 0, 0]</code>) &#x2014;
The bounding box to use for the special [PAD] token.`,name:"pad_token_box"},{anchor:"transformers.UdopTokenizer.pad_token_label",description:`<strong>pad_token_label</strong> (<code>int</code>, <em>optional</em>, defaults to -100) &#x2014;
The label to use for padding tokens. Defaults to -100, which is the <code>ignore_index</code> of PyTorch&#x2019;s
CrossEntropyLoss.`,name:"pad_token_label"},{anchor:"transformers.UdopTokenizer.only_label_first_subword",description:`<strong>only_label_first_subword</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to only label the first subword, in case word labels are provided.`,name:"only_label_first_subword"},{anchor:"transformers.UdopTokenizer.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&quot;&lt;s&gt;NOTUSED&quot;, &quot;&lt;/s&gt;NOTUSED&quot;]</code>) &#x2014;
Additional special tokens used by the tokenizer.`,name:"additional_special_tokens"},{anchor:"transformers.UdopTokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>`,name:"sp_model_kwargs"},{anchor:"transformers.UdopTokenizer.legacy",description:`<strong>legacy</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the <code>legacy</code> behaviour of the tokenizer should be used. Legacy is before the merge of #24622
which includes fixes to properly handle tokens that appear after special tokens. A simple example:</p>
<ul>
<li><code>legacy=True</code>:</li>
</ul>`,name:"legacy"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/udop/tokenization_udop.py#L150"}}),Ne=new U({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.UdopTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.UdopTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.UdopTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/udop/tokenization_udop.py#L382",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),Be=new U({props:{name:"get_special_tokens_mask",anchor:"transformers.UdopTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.UdopTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.UdopTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.UdopTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/udop/tokenization_udop.py#L308",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),Ge=new U({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.UdopTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.UdopTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.UdopTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/udop/tokenization_udop.py#L359",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of zeros.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),Pe=new U({props:{name:"save_vocabulary",anchor:"transformers.UdopTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/udop/tokenization_udop.py#L490"}}),Ze=new W({props:{title:"UdopTokenizerFast",local:"transformers.UdopTokenizerFast",headingTag:"h2"}}),We=new U({props:{name:"class transformers.UdopTokenizerFast",anchor:"transformers.UdopTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"sep_token_box",val:" = [1000, 1000, 1000, 1000]"},{name:"pad_token_box",val:" = [0, 0, 0, 0]"},{name:"pad_token_label",val:" = -100"},{name:"only_label_first_subword",val:" = True"},{name:"additional_special_tokens",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.UdopTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.UdopTokenizerFast.tokenizer_file",description:`<strong>tokenizer_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Path to the tokenizer file.`,name:"tokenizer_file"},{anchor:"transformers.UdopTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.UdopTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.UdopTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.UdopTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.UdopTokenizerFast.sep_token_box",description:`<strong>sep_token_box</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[1000, 1000, 1000, 1000]</code>) &#x2014;
The bounding box to use for the special [SEP] token.`,name:"sep_token_box"},{anchor:"transformers.UdopTokenizerFast.pad_token_box",description:`<strong>pad_token_box</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[0, 0, 0, 0]</code>) &#x2014;
The bounding box to use for the special [PAD] token.`,name:"pad_token_box"},{anchor:"transformers.UdopTokenizerFast.pad_token_label",description:`<strong>pad_token_label</strong> (<code>int</code>, <em>optional</em>, defaults to -100) &#x2014;
The label to use for padding tokens. Defaults to -100, which is the <code>ignore_index</code> of PyTorch&#x2019;s
CrossEntropyLoss.`,name:"pad_token_label"},{anchor:"transformers.UdopTokenizerFast.only_label_first_subword",description:`<strong>only_label_first_subword</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to only label the first subword, in case word labels are provided.`,name:"only_label_first_subword"},{anchor:"transformers.UdopTokenizerFast.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&quot;&lt;s&gt;NOTUSED&quot;, &quot;&lt;/s&gt;NOTUSED&quot;]</code>) &#x2014;
Additional special tokens used by the tokenizer.`,name:"additional_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/udop/tokenization_udop_fast.py#L148"}}),Re=new U({props:{name:"batch_encode_plus_boxes",anchor:"transformers.UdopTokenizerFast.batch_encode_plus_boxes",parameters:[{name:"batch_text_or_text_pairs",val:": typing.Union[typing.List[str], typing.List[typing.Tuple[str, str]], typing.List[typing.List[str]]]"},{name:"is_pair",val:": typing.Optional[bool] = None"},{name:"boxes",val:": typing.Optional[typing.List[typing.List[typing.List[int]]]] = None"},{name:"word_labels",val:": typing.Optional[typing.List[typing.List[int]]] = None"},{name:"add_special_tokens",val:": bool = True"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = False"},{name:"truncation",val:": typing.Union[bool, str, transformers.tokenization_utils_base.TruncationStrategy] = None"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"stride",val:": int = 0"},{name:"is_split_into_words",val:": bool = False"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"padding_side",val:": typing.Optional[str] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"return_token_type_ids",val:": typing.Optional[bool] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = None"},{name:"return_overflowing_tokens",val:": bool = False"},{name:"return_special_tokens_mask",val:": bool = False"},{name:"return_offsets_mapping",val:": bool = False"},{name:"return_length",val:": bool = False"},{name:"verbose",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.UdopTokenizerFast.batch_encode_plus_boxes.batch_text_or_text_pairs",description:`<strong>batch_text_or_text_pairs</strong> (<code>List[str]</code>, <code>List[Tuple[str, str]]</code>, <code>List[List[str]]</code>, <code>List[Tuple[List[str], List[str]]]</code>, and for not-fast tokenizers, also <code>List[List[int]]</code>, <code>List[Tuple[List[int], List[int]]]</code>) &#x2014;
Batch of sequences or pair of sequences to be encoded. This can be a list of
string/string-sequences/int-sequences or a list of pair of string/string-sequences/int-sequence (see
details in <code>encode_plus</code>).`,name:"batch_text_or_text_pairs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/udop/tokenization_udop_fast.py#L442"}}),K=new St({props:{warning:!0,$$slots:{default:[Ns]},$$scope:{ctx:j}}}),He=new U({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.UdopTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.UdopTokenizerFast.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.UdopTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/udop/tokenization_udop_fast.py#L961",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),De=new U({props:{name:"call_boxes",anchor:"transformers.UdopTokenizerFast.call_boxes",parameters:[{name:"text",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]]"},{name:"text_pair",val:": typing.Union[typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"boxes",val:": typing.Union[typing.List[typing.List[int]], typing.List[typing.List[typing.List[int]]]] = None"},{name:"word_labels",val:": typing.Union[typing.List[int], typing.List[typing.List[int]], NoneType] = None"},{name:"add_special_tokens",val:": bool = True"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = False"},{name:"truncation",val:": typing.Union[bool, str, transformers.tokenization_utils_base.TruncationStrategy] = None"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"stride",val:": int = 0"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"padding_side",val:": typing.Optional[str] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"return_token_type_ids",val:": typing.Optional[bool] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = None"},{name:"return_overflowing_tokens",val:": bool = False"},{name:"return_special_tokens_mask",val:": bool = False"},{name:"return_offsets_mapping",val:": bool = False"},{name:"return_length",val:": bool = False"},{name:"verbose",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.UdopTokenizerFast.call_boxes.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string, a list of strings
(words of a single example or questions of a batch of examples) or a list of list of strings (batch of
words).`,name:"text"},{anchor:"transformers.UdopTokenizerFast.call_boxes.text_pair",description:`<strong>text_pair</strong> (<code>List[str]</code>, <code>List[List[str]]</code>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence should be a list of strings
(pretokenized string).`,name:"text_pair"},{anchor:"transformers.UdopTokenizerFast.call_boxes.boxes",description:`<strong>boxes</strong> (<code>List[List[int]]</code>, <code>List[List[List[int]]]</code>) &#x2014;
Word-level bounding boxes. Each bounding box should be normalized to be on a 0-1000 scale.`,name:"boxes"},{anchor:"transformers.UdopTokenizerFast.call_boxes.word_labels",description:`<strong>word_labels</strong> (<code>List[int]</code>, <code>List[List[int]]</code>, <em>optional</em>) &#x2014;
Word-level integer labels (for token classification tasks such as FUNSD, CORD).`,name:"word_labels"},{anchor:"transformers.UdopTokenizerFast.call_boxes.add_special_tokens",description:`<strong>add_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to encode the sequences with the special tokens relative to their model.`,name:"add_special_tokens"},{anchor:"transformers.UdopTokenizerFast.call_boxes.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/main/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.UdopTokenizerFast.call_boxes.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or
to the maximum acceptable input length for the model if that argument is not provided. This will
truncate token by token, removing a token from the longest sequence in the pair if a pair of
sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the first sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_second&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the second sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"},{anchor:"transformers.UdopTokenizerFast.call_boxes.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Controls the maximum length to use by one of the truncation/padding parameters.</p>
<p>If left unset or set to <code>None</code>, this will use the predefined model maximum length if a maximum length
is required by one of the truncation/padding parameters. If the model has no specific maximum input
length (like XLNet) truncation/padding to a maximum length will be deactivated.`,name:"max_length"},{anchor:"transformers.UdopTokenizerFast.call_boxes.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If set to a number along with <code>max_length</code>, the overflowing tokens returned when
<code>return_overflowing_tokens=True</code> will contain some tokens from the end of the truncated sequence
returned to provide some overlap between truncated and overflowing sequences. The value of this
argument defines the number of overlapping tokens.`,name:"stride"},{anchor:"transformers.UdopTokenizerFast.call_boxes.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value. This is especially useful to enable
the use of Tensor Cores on NVIDIA hardware with compute capability <code>&gt;= 7.5</code> (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.UdopTokenizerFast.call_boxes.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/main/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.UdopTokenizerFast.call_boxes.return_token_type_ids",description:`<strong>return_token_type_ids</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to return token type IDs. If left to the default, will return the token type IDs according to
the specific tokenizer&#x2019;s default, defined by the <code>return_outputs</code> attribute.</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"return_token_type_ids"},{anchor:"transformers.UdopTokenizerFast.call_boxes.return_attention_mask",description:`<strong>return_attention_mask</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to return the attention mask. If left to the default, will return the attention mask according
to the specific tokenizer&#x2019;s default, defined by the <code>return_outputs</code> attribute.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"return_attention_mask"},{anchor:"transformers.UdopTokenizerFast.call_boxes.return_overflowing_tokens",description:`<strong>return_overflowing_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return overflowing token sequences. If a pair of sequences of input ids (or a batch
of pairs) is provided with <code>truncation_strategy = longest_first</code> or <code>True</code>, an error is raised instead
of returning overflowing tokens.`,name:"return_overflowing_tokens"},{anchor:"transformers.UdopTokenizerFast.call_boxes.return_special_tokens_mask",description:`<strong>return_special_tokens_mask</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return special tokens mask information.`,name:"return_special_tokens_mask"},{anchor:"transformers.UdopTokenizerFast.call_boxes.return_offsets_mapping",description:`<strong>return_offsets_mapping</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return <code>(char_start, char_end)</code> for each token.</p>
<p>This is only available on fast tokenizers inheriting from <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a>, if using
Python&#x2019;s tokenizer, this method will raise <code>NotImplementedError</code>.`,name:"return_offsets_mapping"},{anchor:"transformers.UdopTokenizerFast.call_boxes.return_length",description:`<strong>return_length</strong>  (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return the lengths of the encoded inputs.`,name:"return_length"},{anchor:"transformers.UdopTokenizerFast.call_boxes.verbose",description:`<strong>verbose</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to print more information and warnings.`,name:"verbose"},{anchor:"transformers.UdopTokenizerFast.call_boxes.*kwargs",description:"*<strong>*kwargs</strong> &#x2014; passed to the <code>self.tokenize()</code> method",name:"*kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/udop/tokenization_udop_fast.py#L276",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a> with the following fields:</p>
<ul>
<li>
<p><strong>input_ids</strong> — List of token ids to be fed to a model.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a></p>
</li>
<li>
<p><strong>bbox</strong> — List of bounding boxes to be fed to a model.</p>
</li>
<li>
<p><strong>token_type_ids</strong> — List of token type ids to be fed to a model (when <code>return_token_type_ids=True</code> or
if <em>“token_type_ids”</em> is in <code>self.model_input_names</code>).</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a></p>
</li>
<li>
<p><strong>attention_mask</strong> — List of indices specifying which tokens should be attended to by the model (when
<code>return_attention_mask=True</code> or if <em>“attention_mask”</em> is in <code>self.model_input_names</code>).</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
</li>
<li>
<p><strong>labels</strong> — List of labels to be fed to a model. (when <code>word_labels</code> is specified).</p>
</li>
<li>
<p><strong>overflowing_tokens</strong> — List of overflowing tokens sequences (when a <code>max_length</code> is specified and
<code>return_overflowing_tokens=True</code>).</p>
</li>
<li>
<p><strong>num_truncated_tokens</strong> — Number of tokens truncated (when a <code>max_length</code> is specified and
<code>return_overflowing_tokens=True</code>).</p>
</li>
<li>
<p><strong>special_tokens_mask</strong> — List of 0s and 1s, with 1 specifying added special tokens and 0 specifying
regular sequence tokens (when <code>add_special_tokens=True</code> and <code>return_special_tokens_mask=True</code>).</p>
</li>
<li>
<p><strong>length</strong> — The length of the inputs (when <code>return_length=True</code>).</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a></p>
`}}),Ee=new U({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.UdopTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.UdopTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.UdopTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/udop/tokenization_udop_fast.py#L986",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of zeros.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),Oe=new U({props:{name:"encode_boxes",anchor:"transformers.UdopTokenizerFast.encode_boxes",parameters:[{name:"text",val:": typing.Union[str, typing.List[str], typing.List[int]]"},{name:"text_pair",val:": typing.Union[str, typing.List[str], typing.List[int], NoneType] = None"},{name:"boxes",val:": typing.Optional[typing.List[typing.List[int]]] = None"},{name:"word_labels",val:": typing.Optional[typing.List[typing.List[int]]] = None"},{name:"add_special_tokens",val:": bool = True"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = False"},{name:"truncation",val:": typing.Union[bool, str, transformers.tokenization_utils_base.TruncationStrategy] = None"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"stride",val:": int = 0"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.UdopTokenizerFast.encode_boxes.Converts",description:"<strong>Converts</strong> a string to a sequence of ids (integer), using the tokenizer and vocabulary. Same as doing &#x2014;",name:"Converts"},{anchor:"transformers.UdopTokenizerFast.encode_boxes.self.convert_tokens_to_ids(self.tokenize(text)).",description:`<strong><code>self.convert_tokens_to_ids(self.tokenize(text))</code>.</strong> &#x2014;
text (<code>str</code>, <code>List[str]</code> or <code>List[int]</code>):
The first sequence to be encoded. This can be a string, a list of strings (tokenized string using the
<code>tokenize</code> method) or a list of integers (tokenized string ids using the <code>convert_tokens_to_ids</code>
method).
text_pair (<code>str</code>, <code>List[str]</code> or <code>List[int]</code>, <em>optional</em>):
Optional second sequence to be encoded. This can be a string, a list of strings (tokenized string using
the <code>tokenize</code> method) or a list of integers (tokenized string ids using the <code>convert_tokens_to_ids</code>
method).`,name:"self.convert_tokens_to_ids(self.tokenize(text))."}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/udop/tokenization_udop_fast.py#L750"}}),Ve=new U({props:{name:"encode_plus_boxes",anchor:"transformers.UdopTokenizerFast.encode_plus_boxes",parameters:[{name:"text",val:": typing.Union[str, typing.List[str]]"},{name:"text_pair",val:": typing.Optional[typing.List[str]] = None"},{name:"boxes",val:": typing.Optional[typing.List[typing.List[int]]] = None"},{name:"word_labels",val:": typing.Optional[typing.List[typing.List[int]]] = None"},{name:"add_special_tokens",val:": bool = True"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = False"},{name:"truncation",val:": typing.Union[bool, str, transformers.tokenization_utils_base.TruncationStrategy] = None"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"stride",val:": int = 0"},{name:"is_split_into_words",val:": bool = False"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"padding_side",val:": typing.Optional[str] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"return_token_type_ids",val:": typing.Optional[bool] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = None"},{name:"return_overflowing_tokens",val:": bool = False"},{name:"return_special_tokens_mask",val:": bool = False"},{name:"return_offsets_mapping",val:": bool = False"},{name:"return_length",val:": bool = False"},{name:"verbose",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.UdopTokenizerFast.encode_plus_boxes.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code> or (for non-fast tokenizers) <code>List[int]</code>) &#x2014;
The first sequence to be encoded. This can be a string, a list of strings (tokenized string using the
<code>tokenize</code> method) or a list of integers (tokenized string ids using the <code>convert_tokens_to_ids</code>
method).`,name:"text"},{anchor:"transformers.UdopTokenizerFast.encode_plus_boxes.text_pair",description:`<strong>text_pair</strong> (<code>str</code>, <code>List[str]</code> or <code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second sequence to be encoded. This can be a string, a list of strings (tokenized string using
the <code>tokenize</code> method) or a list of integers (tokenized string ids using the <code>convert_tokens_to_ids</code>
method).`,name:"text_pair"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/udop/tokenization_udop_fast.py#L793"}}),oe=new St({props:{warning:!0,$$slots:{default:[Bs]},$$scope:{ctx:j}}}),Se=new W({props:{title:"UdopProcessor",local:"transformers.UdopProcessor",headingTag:"h2"}}),Ae=new U({props:{name:"class transformers.UdopProcessor",anchor:"transformers.UdopProcessor",parameters:[{name:"image_processor",val:""},{name:"tokenizer",val:""}],parametersDescription:[{anchor:"transformers.UdopProcessor.image_processor",description:`<strong>image_processor</strong> (<code>LayoutLMv3ImageProcessor</code>) &#x2014;
An instance of <a href="/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3ImageProcessor">LayoutLMv3ImageProcessor</a>. The image processor is a required input.`,name:"image_processor"},{anchor:"transformers.UdopProcessor.tokenizer",description:`<strong>tokenizer</strong> (<code>UdopTokenizer</code> or <code>UdopTokenizerFast</code>) &#x2014;
An instance of <a href="/docs/transformers/main/en/model_doc/udop#transformers.UdopTokenizer">UdopTokenizer</a> or <a href="/docs/transformers/main/en/model_doc/udop#transformers.UdopTokenizerFast">UdopTokenizerFast</a>. The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/udop/processing_udop.py#L55"}}),Xe=new U({props:{name:"__call__",anchor:"transformers.UdopProcessor.__call__",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), list['PIL.Image.Image'], list[numpy.ndarray], list['torch.Tensor'], NoneType] = None"},{name:"text",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"*args",val:""},{name:"audio",val:" = None"},{name:"videos",val:" = None"},{name:"**kwargs",val:": typing_extensions.Unpack[transformers.models.udop.processing_udop.UdopProcessorKwargs]"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/udop/processing_udop.py#L86"}}),Ye=new W({props:{title:"UdopModel",local:"transformers.UdopModel",headingTag:"h2"}}),Qe=new U({props:{name:"class transformers.UdopModel",anchor:"transformers.UdopModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.UdopModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/udop#transformers.UdopConfig">UdopConfig</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/udop/modeling_udop.py#L1668"}}),Ke=new U({props:{name:"forward",anchor:"transformers.UdopModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"bbox",val:": typing.Dict[str, typing.Any] = None"},{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"visual_bbox",val:": typing.Dict[str, typing.Any] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_inputs_embeds",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:"use_cache",val:" = True"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"cache_position",val:": typing.Optional[torch.LongTensor] = None"}],parametersDescription:[{anchor:"transformers.UdopModel.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. UDOP is a model with relative position embeddings so
you should be able to pad the inputs on both the right and the left. 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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for detail.
<a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.UdopModel.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>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.UdopModel.forward.bbox",description:`<strong>bbox</strong> (<code>torch.LongTensor</code> of shape <code>({0}, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each input sequence tokens. Selected in the range <code>[0, config.max_2d_position_embeddings-1]</code>. Each bounding box should be a normalized version in (x0, y0, x1, y1)
format, where (x0, y0) corresponds to the position of the upper left corner in the bounding box, and (x1,
y1) represents the position of the lower right corner.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.`,name:"bbox"},{anchor:"transformers.UdopModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Batch of document images. Each image is divided into patches of shape <code>(num_channels, config.patch_size, config.patch_size)</code> and the total number of patches (=<code>patch_sequence_length</code>) equals to <code>((height / config.patch_size) * (width / config.patch_size))</code>.`,name:"pixel_values"},{anchor:"transformers.UdopModel.forward.visual_bbox",description:`<strong>visual_bbox</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, patch_sequence_length, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each patch in the image. If not provided, bounding boxes are created in the model.`,name:"visual_bbox"},{anchor:"transformers.UdopModel.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. 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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.
<a href="../glossary#decoder-input-ids">What are decoder input IDs?</a> T5 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>). To know more on how to prepare
<code>decoder_input_ids</code> for pretraining take a look at <a href="./t5#training">T5 Training</a>.`,name:"decoder_input_ids"},{anchor:"transformers.UdopModel.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.UdopModel.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.UdopModel.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.UdopModel.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.UdopModel.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.UdopModel.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.
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.UdopModel.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.UdopModel.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. 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.UdopModel.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.UdopModel.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.UdopModel.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.UdopModel.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.UdopModel.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. It is used to update the
cache in the correct position and to infer the complete sequence length.`,name:"cache_position"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/udop/modeling_udop.py#L1718",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<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/udop#transformers.UdopConfig"
>UdopConfig</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>) — 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>) — 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>) — 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>) — 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>) — 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’s 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<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>
`}}),ne=new St({props:{$$slots:{default:[Gs]},$$scope:{ctx:j}}}),se=new In({props:{anchor:"transformers.UdopModel.forward.example",$$slots:{default:[Ps]},$$scope:{ctx:j}}}),et=new W({props:{title:"UdopForConditionalGeneration",local:"transformers.UdopForConditionalGeneration",headingTag:"h2"}}),tt=new U({props:{name:"class transformers.UdopForConditionalGeneration",anchor:"transformers.UdopForConditionalGeneration",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.UdopForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/udop#transformers.UdopConfig">UdopConfig</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/udop/modeling_udop.py#L1831"}}),ot=new U({props:{name:"forward",anchor:"transformers.UdopForConditionalGeneration.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"bbox",val:": typing.Dict[str, typing.Any] = None"},{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"visual_bbox",val:": typing.Dict[str, typing.Any] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_inputs_embeds",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:"use_cache",val:" = True"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"cache_position",val:": typing.Optional[torch.LongTensor] = None"}],parametersDescription:[{anchor:"transformers.UdopForConditionalGeneration.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. UDOP is a model with relative position embeddings so
you should be able to pad the inputs on both the right and the left. 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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for detail.
<a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.UdopForConditionalGeneration.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>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.UdopForConditionalGeneration.forward.bbox",description:`<strong>bbox</strong> (<code>torch.LongTensor</code> of shape <code>({0}, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each input sequence tokens. Selected in the range <code>[0, config.max_2d_position_embeddings-1]</code>. Each bounding box should be a normalized version in (x0, y0, x1, y1)
format, where (x0, y0) corresponds to the position of the upper left corner in the bounding box, and (x1,
y1) represents the position of the lower right corner.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.`,name:"bbox"},{anchor:"transformers.UdopForConditionalGeneration.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Batch of document images. Each image is divided into patches of shape <code>(num_channels, config.patch_size, config.patch_size)</code> and the total number of patches (=<code>patch_sequence_length</code>) equals to <code>((height / config.patch_size) * (width / config.patch_size))</code>.`,name:"pixel_values"},{anchor:"transformers.UdopForConditionalGeneration.forward.visual_bbox",description:`<strong>visual_bbox</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, patch_sequence_length, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each patch in the image. If not provided, bounding boxes are created in the model.`,name:"visual_bbox"},{anchor:"transformers.UdopForConditionalGeneration.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. 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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.
<a href="../glossary#decoder-input-ids">What are decoder input IDs?</a> T5 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>). To know more on how to prepare
<code>decoder_input_ids</code> for pretraining take a look at <a href="./t5#training">T5 Training</a>.`,name:"decoder_input_ids"},{anchor:"transformers.UdopForConditionalGeneration.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.UdopForConditionalGeneration.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.UdopForConditionalGeneration.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.UdopForConditionalGeneration.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.UdopForConditionalGeneration.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.UdopForConditionalGeneration.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.
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.UdopForConditionalGeneration.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.UdopForConditionalGeneration.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. 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.UdopForConditionalGeneration.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.UdopForConditionalGeneration.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.UdopForConditionalGeneration.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.UdopForConditionalGeneration.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.UdopForConditionalGeneration.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. It is used to update the
cache in the correct position and to infer the complete sequence length.`,name:"cache_position"},{anchor:"transformers.UdopForConditionalGeneration.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the language modeling 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/udop/modeling_udop.py#L1894",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<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/udop#transformers.UdopConfig"
>UdopConfig</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) — 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>) — 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>) — 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>) — 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>) — 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>) — 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’s 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<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>
`}}),ae=new St({props:{$$slots:{default:[Zs]},$$scope:{ctx:j}}}),re=new In({props:{anchor:"transformers.UdopForConditionalGeneration.forward.example",$$slots:{default:[Ws]},$$scope:{ctx:j}}}),nt=new W({props:{title:"UdopEncoderModel",local:"transformers.UdopEncoderModel",headingTag:"h2"}}),st=new U({props:{name:"class transformers.UdopEncoderModel",anchor:"transformers.UdopEncoderModel",parameters:[{name:"config",val:": UdopConfig"}],parametersDescription:[{anchor:"transformers.UdopEncoderModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/udop#transformers.UdopConfig">UdopConfig</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/udop/modeling_udop.py#L2061"}}),at=new U({props:{name:"forward",anchor:"transformers.UdopEncoderModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"bbox",val:": typing.Dict[str, typing.Any] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"visual_bbox",val:": typing.Dict[str, typing.Any] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = 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.UdopEncoderModel.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. T5 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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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="./t5#training">T5 Training</a>.`,name:"input_ids"},{anchor:"transformers.UdopEncoderModel.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.UdopEncoderModel.forward.bbox",description:`<strong>bbox</strong> (<code>torch.LongTensor</code> of shape <code>({0}, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each input sequence tokens. Selected in the range <code>[0, config.max_2d_position_embeddings-1]</code>. Each bounding box should be a normalized version in (x0, y0, x1, y1)
format, where (x0, y0) corresponds to the position of the upper left corner in the bounding box, and (x1,
y1) represents the position of the lower right corner.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.`,name:"bbox"},{anchor:"transformers.UdopEncoderModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Batch of document images. Each image is divided into patches of shape <code>(num_channels, config.patch_size, config.patch_size)</code> and the total number of patches (=<code>patch_sequence_length</code>) equals to <code>((height / config.patch_size) * (width / config.patch_size))</code>.`,name:"pixel_values"},{anchor:"transformers.UdopEncoderModel.forward.visual_bbox",description:`<strong>visual_bbox</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, patch_sequence_length, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each patch in the image. If not provided, bounding boxes are created in the model.`,name:"visual_bbox"},{anchor:"transformers.UdopEncoderModel.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.UdopEncoderModel.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.UdopEncoderModel.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.UdopEncoderModel.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.UdopEncoderModel.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/udop/modeling_udop.py#L2107",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.udop.modeling_udop.BaseModelOutputWithAttentionMask</code> 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/udop#transformers.UdopConfig"
>UdopConfig</a>) and inputs.</p>
<ul>
<li><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model. 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.</li>
<li><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or</li>
<li><strong>when</strong> <code>config.use_cache=True</code>) — 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 optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>. Contains pre-computed hidden-states (key and values in the
self-attention blocks and optionally if <code>config.is_encoder_decoder=True</code> in the cross-attention blocks)
that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</li>
<li><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or</li>
<li><strong>when</strong> <code>config.output_hidden_states=True</code>) — 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>. Hidden-states of
the model at the output of each layer plus the optional initial embedding outputs.</li>
<li><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when</li>
<li><strong><code>config.output_attentions=True</code>):</strong>
Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
<li><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and</li>
<li><strong><code>config.add_cross_attention=True</code></strong> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights of the decoder’s cross-attention layer, after the attention softmax,
used to compute the weighted average in the cross-attention heads.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.udop.modeling_udop.BaseModelOutputWithAttentionMask</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ie=new St({props:{$$slots:{default:[Rs]},$$scope:{ctx:j}}}),de=new In({props:{anchor:"transformers.UdopEncoderModel.forward.example",$$slots:{default:[Hs]},$$scope:{ctx:j}}}),rt=new Is({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/udop.md"}}),{c(){d=r("meta"),k=o(),p=r("p"),y=o(),h(x.$$.fragment),m=o(),z=r("div"),z.innerHTML=Nn,Xt=o(),h(fe.$$.fragment),Yt=o(),_e=r("p"),_e.innerHTML=Bn,Qt=o(),be=r("p"),be.textContent=Gn,Kt=o(),ye=r("p"),ye.textContent=Pn,eo=o(),X=r("img"),to=o(),ke=r("small"),ke.innerHTML=Wn,oo=o(),h(Te.$$.fragment),no=o(),ve=r("ul"),ve.innerHTML=Rn,so=o(),h(we.$$.fragment),ao=o(),xe=r("p"),xe.innerHTML=Hn,ro=o(),h(Me.$$.fragment),io=o(),Ue=r("p"),Ue.innerHTML=Dn,lo=o(),ze=r("ul"),ze.innerHTML=En,co=o(),$e=r("p"),$e.innerHTML=On,po=o(),h(je.$$.fragment),mo=o(),Ce=r("p"),Ce.textContent=Vn,ho=o(),qe=r("ul"),qe.innerHTML=Sn,uo=o(),h(Le.$$.fragment),go=o(),Z=r("div"),h(Je.$$.fragment),Jo=o(),lt=r("p"),lt.innerHTML=An,Fo=o(),ct=r("p"),ct.innerHTML=Xn,fo=o(),h(Fe.$$.fragment),_o=o(),$=r("div"),h(Ie.$$.fragment),Io=o(),pt=r("p"),pt.innerHTML=Yn,No=o(),mt=r("p"),mt.innerHTML=Qn,Bo=o(),R=r("div"),h(Ne.$$.fragment),Go=o(),ht=r("p"),ht.textContent=Kn,Po=o(),ut=r("ul"),ut.innerHTML=es,Zo=o(),Y=r("div"),h(Be.$$.fragment),Wo=o(),gt=r("p"),gt.innerHTML=ts,Ro=o(),Q=r("div"),h(Ge.$$.fragment),Ho=o(),ft=r("p"),ft.textContent=os,Do=o(),_t=r("div"),h(Pe.$$.fragment),bo=o(),h(Ze.$$.fragment),yo=o(),v=r("div"),h(We.$$.fragment),Eo=o(),bt=r("p"),bt.innerHTML=ns,Oo=o(),yt=r("p"),yt.innerHTML=ss,Vo=o(),H=r("div"),h(Re.$$.fragment),So=o(),kt=r("p"),kt.textContent=as,Ao=o(),h(K.$$.fragment),Xo=o(),D=r("div"),h(He.$$.fragment),Yo=o(),Tt=r("p"),Tt.textContent=rs,Qo=o(),vt=r("ul"),vt.innerHTML=is,Ko=o(),ee=r("div"),h(De.$$.fragment),en=o(),wt=r("p"),wt.textContent=ds,tn=o(),te=r("div"),h(Ee.$$.fragment),on=o(),xt=r("p"),xt.textContent=ls,nn=o(),Mt=r("div"),h(Oe.$$.fragment),sn=o(),E=r("div"),h(Ve.$$.fragment),an=o(),Ut=r("p"),Ut.textContent=cs,rn=o(),h(oe.$$.fragment),ko=o(),h(Se.$$.fragment),To=o(),C=r("div"),h(Ae.$$.fragment),dn=o(),zt=r("p"),zt.textContent=ps,ln=o(),$t=r("p"),$t.innerHTML=ms,cn=o(),jt=r("p"),jt.innerHTML=hs,pn=o(),Ct=r("p"),Ct.innerHTML=us,mn=o(),I=r("div"),h(Xe.$$.fragment),hn=o(),qt=r("p"),qt.innerHTML=gs,un=o(),Lt=r("p"),Lt.innerHTML=fs,gn=o(),Jt=r("p"),Jt.textContent=_s,vo=o(),h(Ye.$$.fragment),wo=o(),J=r("div"),h(Qe.$$.fragment),fn=o(),Ft=r("p"),Ft.innerHTML=bs,_n=o(),It=r("p"),It.innerHTML=ys,bn=o(),N=r("div"),h(Ke.$$.fragment),yn=o(),Nt=r("p"),Nt.innerHTML=ks,kn=o(),h(ne.$$.fragment),Tn=o(),h(se.$$.fragment),xo=o(),h(et.$$.fragment),Mo=o(),L=r("div"),h(tt.$$.fragment),vn=o(),Bt=r("p"),Bt.textContent=Ts,wn=o(),Gt=r("p"),Gt.innerHTML=vs,xn=o(),Pt=r("p"),Pt.innerHTML=ws,Mn=o(),B=r("div"),h(ot.$$.fragment),Un=o(),Zt=r("p"),Zt.innerHTML=xs,zn=o(),h(ae.$$.fragment),$n=o(),h(re.$$.fragment),Uo=o(),h(nt.$$.fragment),zo=o(),F=r("div"),h(st.$$.fragment),jn=o(),Wt=r("p"),Wt.innerHTML=Ms,Cn=o(),Rt=r("p"),Rt.innerHTML=Us,qn=o(),G=r("div"),h(at.$$.fragment),Ln=o(),Ht=r("p"),Ht.innerHTML=zs,Jn=o(),h(ie.$$.fragment),Fn=o(),h(de.$$.fragment),$o=o(),h(rt.$$.fragment),jo=o(),Ot=r("p"),this.h()},l(e){const a=Fs("svelte-u9bgzb",document.head);d=i(a,"META",{name:!0,content:!0}),a.forEach(s),k=n(e),p=i(e,"P",{}),w(p).forEach(s),y=n(e),u(x.$$.fragment,e),m=n(e),z=i(e,"DIV",{class:!0,"data-svelte-h":!0}),c(z)!=="svelte-13t8s2t"&&(z.innerHTML=Nn),Xt=n(e),u(fe.$$.fragment,e),Yt=n(e),_e=i(e,"P",{"data-svelte-h":!0}),c(_e)!=="svelte-zcjc2q"&&(_e.innerHTML=Bn),Qt=n(e),be=i(e,"P",{"data-svelte-h":!0}),c(be)!=="svelte-vfdo9a"&&(be.textContent=Gn),Kt=n(e),ye=i(e,"P",{"data-svelte-h":!0}),c(ye)!=="svelte-xdaud3"&&(ye.textContent=Pn),eo=n(e),X=i(e,"IMG",{src:!0,alt:!0,width:!0}),to=n(e),ke=i(e,"SMALL",{"data-svelte-h":!0}),c(ke)!=="svelte-gontjk"&&(ke.innerHTML=Wn),oo=n(e),u(Te.$$.fragment,e),no=n(e),ve=i(e,"UL",{"data-svelte-h":!0}),c(ve)!=="svelte-1ucaiqb"&&(ve.innerHTML=Rn),so=n(e),u(we.$$.fragment,e),ao=n(e),xe=i(e,"P",{"data-svelte-h":!0}),c(xe)!=="svelte-rq1xjz"&&(xe.innerHTML=Hn),ro=n(e),u(Me.$$.fragment,e),io=n(e),Ue=i(e,"P",{"data-svelte-h":!0}),c(Ue)!=="svelte-14yh9cy"&&(Ue.innerHTML=Dn),lo=n(e),ze=i(e,"UL",{"data-svelte-h":!0}),c(ze)!=="svelte-fp1jlf"&&(ze.innerHTML=En),co=n(e),$e=i(e,"P",{"data-svelte-h":!0}),c($e)!=="svelte-1cfgh3j"&&($e.innerHTML=On),po=n(e),u(je.$$.fragment,e),mo=n(e),Ce=i(e,"P",{"data-svelte-h":!0}),c(Ce)!=="svelte-qaon2f"&&(Ce.textContent=Vn),ho=n(e),qe=i(e,"UL",{"data-svelte-h":!0}),c(qe)!=="svelte-157jvhr"&&(qe.innerHTML=Sn),uo=n(e),u(Le.$$.fragment,e),go=n(e),Z=i(e,"DIV",{class:!0});var V=w(Z);u(Je.$$.fragment,V),Jo=n(V),lt=i(V,"P",{"data-svelte-h":!0}),c(lt)!=="svelte-19l207x"&&(lt.innerHTML=An),Fo=n(V),ct=i(V,"P",{"data-svelte-h":!0}),c(ct)!=="svelte-o55m63"&&(ct.innerHTML=Xn),V.forEach(s),fo=n(e),u(Fe.$$.fragment,e),_o=n(e),$=i(e,"DIV",{class:!0});var q=w($);u(Ie.$$.fragment,q),Io=n(q),pt=i(q,"P",{"data-svelte-h":!0}),c(pt)!=="svelte-1shqith"&&(pt.innerHTML=Yn),No=n(q),mt=i(q,"P",{"data-svelte-h":!0}),c(mt)!=="svelte-1c3t5ty"&&(mt.innerHTML=Qn),Bo=n(q),R=i(q,"DIV",{class:!0});var S=w(R);u(Ne.$$.fragment,S),Go=n(S),ht=i(S,"P",{"data-svelte-h":!0}),c(ht)!=="svelte-1wjq39d"&&(ht.textContent=Kn),Po=n(S),ut=i(S,"UL",{"data-svelte-h":!0}),c(ut)!=="svelte-8gh3n2"&&(ut.innerHTML=es),S.forEach(s),Zo=n(q),Y=i(q,"DIV",{class:!0});var it=w(Y);u(Be.$$.fragment,it),Wo=n(it),gt=i(it,"P",{"data-svelte-h":!0}),c(gt)!=="svelte-1f4f5kp"&&(gt.innerHTML=ts),it.forEach(s),Ro=n(q),Q=i(q,"DIV",{class:!0});var dt=w(Q);u(Ge.$$.fragment,dt),Ho=n(dt),ft=i(dt,"P",{"data-svelte-h":!0}),c(ft)!=="svelte-fl5ab0"&&(ft.textContent=os),dt.forEach(s),Do=n(q),_t=i(q,"DIV",{class:!0});var Vt=w(_t);u(Pe.$$.fragment,Vt),Vt.forEach(s),q.forEach(s),bo=n(e),u(Ze.$$.fragment,e),yo=n(e),v=i(e,"DIV",{class:!0});var M=w(v);u(We.$$.fragment,M),Eo=n(M),bt=i(M,"P",{"data-svelte-h":!0}),c(bt)!=="svelte-1w6btl9"&&(bt.innerHTML=ns),Oo=n(M),yt=i(M,"P",{"data-svelte-h":!0}),c(yt)!=="svelte-fh0aq"&&(yt.innerHTML=ss),Vo=n(M),H=i(M,"DIV",{class:!0});var A=w(H);u(Re.$$.fragment,A),So=n(A),kt=i(A,"P",{"data-svelte-h":!0}),c(kt)!=="svelte-6p21pf"&&(kt.textContent=as),Ao=n(A),u(K.$$.fragment,A),A.forEach(s),Xo=n(M),D=i(M,"DIV",{class:!0});var Dt=w(D);u(He.$$.fragment,Dt),Yo=n(Dt),Tt=i(Dt,"P",{"data-svelte-h":!0}),c(Tt)!=="svelte-1ooxl9e"&&(Tt.textContent=rs),Qo=n(Dt),vt=i(Dt,"UL",{"data-svelte-h":!0}),c(vt)!=="svelte-rq8uot"&&(vt.innerHTML=is),Dt.forEach(s),Ko=n(M),ee=i(M,"DIV",{class:!0});var qo=w(ee);u(De.$$.fragment,qo),en=n(qo),wt=i(qo,"P",{"data-svelte-h":!0}),c(wt)!=="svelte-1w6bb17"&&(wt.textContent=ds),qo.forEach(s),tn=n(M),te=i(M,"DIV",{class:!0});var Lo=w(te);u(Ee.$$.fragment,Lo),on=n(Lo),xt=i(Lo,"P",{"data-svelte-h":!0}),c(xt)!=="svelte-bub0ru"&&(xt.textContent=ls),Lo.forEach(s),nn=n(M),Mt=i(M,"DIV",{class:!0});var $s=w(Mt);u(Oe.$$.fragment,$s),$s.forEach(s),sn=n(M),E=i(M,"DIV",{class:!0});var Et=w(E);u(Ve.$$.fragment,Et),an=n(Et),Ut=i(Et,"P",{"data-svelte-h":!0}),c(Ut)!=="svelte-ma945j"&&(Ut.textContent=cs),rn=n(Et),u(oe.$$.fragment,Et),Et.forEach(s),M.forEach(s),ko=n(e),u(Se.$$.fragment,e),To=n(e),C=i(e,"DIV",{class:!0});var P=w(C);u(Ae.$$.fragment,P),dn=n(P),zt=i(P,"P",{"data-svelte-h":!0}),c(zt)!=="svelte-1ti6n5s"&&(zt.textContent=ps),ln=n(P),$t=i(P,"P",{"data-svelte-h":!0}),c($t)!=="svelte-uqsnrd"&&($t.innerHTML=ms),cn=n(P),jt=i(P,"P",{"data-svelte-h":!0}),c(jt)!=="svelte-aczqmy"&&(jt.innerHTML=hs),pn=n(P),Ct=i(P,"P",{"data-svelte-h":!0}),c(Ct)!=="svelte-mfoszy"&&(Ct.innerHTML=us),mn=n(P),I=i(P,"DIV",{class:!0});var le=w(I);u(Xe.$$.fragment,le),hn=n(le),qt=i(le,"P",{"data-svelte-h":!0}),c(qt)!=="svelte-23yewj"&&(qt.innerHTML=gs),un=n(le),Lt=i(le,"P",{"data-svelte-h":!0}),c(Lt)!=="svelte-1c5ykyr"&&(Lt.innerHTML=fs),gn=n(le),Jt=i(le,"P",{"data-svelte-h":!0}),c(Jt)!=="svelte-ws0hzs"&&(Jt.textContent=_s),le.forEach(s),P.forEach(s),vo=n(e),u(Ye.$$.fragment,e),wo=n(e),J=i(e,"DIV",{class:!0});var ce=w(J);u(Qe.$$.fragment,ce),fn=n(ce),Ft=i(ce,"P",{"data-svelte-h":!0}),c(Ft)!=="svelte-wif7f7"&&(Ft.innerHTML=bs),_n=n(ce),It=i(ce,"P",{"data-svelte-h":!0}),c(It)!=="svelte-hswkmf"&&(It.innerHTML=ys),bn=n(ce),N=i(ce,"DIV",{class:!0});var pe=w(N);u(Ke.$$.fragment,pe),yn=n(pe),Nt=i(pe,"P",{"data-svelte-h":!0}),c(Nt)!=="svelte-172w7sd"&&(Nt.innerHTML=ks),kn=n(pe),u(ne.$$.fragment,pe),Tn=n(pe),u(se.$$.fragment,pe),pe.forEach(s),ce.forEach(s),xo=n(e),u(et.$$.fragment,e),Mo=n(e),L=i(e,"DIV",{class:!0});var O=w(L);u(tt.$$.fragment,O),vn=n(O),Bt=i(O,"P",{"data-svelte-h":!0}),c(Bt)!=="svelte-170n5ee"&&(Bt.textContent=Ts),wn=n(O),Gt=i(O,"P",{"data-svelte-h":!0}),c(Gt)!=="svelte-gzllee"&&(Gt.innerHTML=vs),xn=n(O),Pt=i(O,"P",{"data-svelte-h":!0}),c(Pt)!=="svelte-hswkmf"&&(Pt.innerHTML=ws),Mn=n(O),B=i(O,"DIV",{class:!0});var me=w(B);u(ot.$$.fragment,me),Un=n(me),Zt=i(me,"P",{"data-svelte-h":!0}),c(Zt)!=="svelte-130vwz3"&&(Zt.innerHTML=xs),zn=n(me),u(ae.$$.fragment,me),$n=n(me),u(re.$$.fragment,me),me.forEach(s),O.forEach(s),Uo=n(e),u(nt.$$.fragment,e),zo=n(e),F=i(e,"DIV",{class:!0});var he=w(F);u(st.$$.fragment,he),jn=n(he),Wt=i(he,"P",{"data-svelte-h":!0}),c(Wt)!=="svelte-151cvgf"&&(Wt.innerHTML=Ms),Cn=n(he),Rt=i(he,"P",{"data-svelte-h":!0}),c(Rt)!=="svelte-hswkmf"&&(Rt.innerHTML=Us),qn=n(he),G=i(he,"DIV",{class:!0});var ue=w(G);u(at.$$.fragment,ue),Ln=n(ue),Ht=i(ue,"P",{"data-svelte-h":!0}),c(Ht)!=="svelte-1duswmz"&&(Ht.innerHTML=zs),Jn=n(ue),u(ie.$$.fragment,ue),Fn=n(ue),u(de.$$.fragment,ue),ue.forEach(s),he.forEach(s),$o=n(e),u(rt.$$.fragment,e),jo=n(e),Ot=i(e,"P",{}),w(Ot).forEach(s),this.h()},h(){T(d,"name","hf:doc:metadata"),T(d,"content",Es),T(z,"class","flex flex-wrap space-x-1"),Cs(X.src,Zn="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/udop_architecture.jpg")||T(X,"src",Zn),T(X,"alt","drawing"),T(X,"width","600"),T(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,a){t(document.head,d),l(e,k,a),l(e,p,a),l(e,y,a),g(x,e,a),l(e,m,a),l(e,z,a),l(e,Xt,a),g(fe,e,a),l(e,Yt,a),l(e,_e,a),l(e,Qt,a),l(e,be,a),l(e,Kt,a),l(e,ye,a),l(e,eo,a),l(e,X,a),l(e,to,a),l(e,ke,a),l(e,oo,a),g(Te,e,a),l(e,no,a),l(e,ve,a),l(e,so,a),g(we,e,a),l(e,ao,a),l(e,xe,a),l(e,ro,a),g(Me,e,a),l(e,io,a),l(e,Ue,a),l(e,lo,a),l(e,ze,a),l(e,co,a),l(e,$e,a),l(e,po,a),g(je,e,a),l(e,mo,a),l(e,Ce,a),l(e,ho,a),l(e,qe,a),l(e,uo,a),g(Le,e,a),l(e,go,a),l(e,Z,a),g(Je,Z,null),t(Z,Jo),t(Z,lt),t(Z,Fo),t(Z,ct),l(e,fo,a),g(Fe,e,a),l(e,_o,a),l(e,$,a),g(Ie,$,null),t($,Io),t($,pt),t($,No),t($,mt),t($,Bo),t($,R),g(Ne,R,null),t(R,Go),t(R,ht),t(R,Po),t(R,ut),t($,Zo),t($,Y),g(Be,Y,null),t(Y,Wo),t(Y,gt),t($,Ro),t($,Q),g(Ge,Q,null),t(Q,Ho),t(Q,ft),t($,Do),t($,_t),g(Pe,_t,null),l(e,bo,a),g(Ze,e,a),l(e,yo,a),l(e,v,a),g(We,v,null),t(v,Eo),t(v,bt),t(v,Oo),t(v,yt),t(v,Vo),t(v,H),g(Re,H,null),t(H,So),t(H,kt),t(H,Ao),g(K,H,null),t(v,Xo),t(v,D),g(He,D,null),t(D,Yo),t(D,Tt),t(D,Qo),t(D,vt),t(v,Ko),t(v,ee),g(De,ee,null),t(ee,en),t(ee,wt),t(v,tn),t(v,te),g(Ee,te,null),t(te,on),t(te,xt),t(v,nn),t(v,Mt),g(Oe,Mt,null),t(v,sn),t(v,E),g(Ve,E,null),t(E,an),t(E,Ut),t(E,rn),g(oe,E,null),l(e,ko,a),g(Se,e,a),l(e,To,a),l(e,C,a),g(Ae,C,null),t(C,dn),t(C,zt),t(C,ln),t(C,$t),t(C,cn),t(C,jt),t(C,pn),t(C,Ct),t(C,mn),t(C,I),g(Xe,I,null),t(I,hn),t(I,qt),t(I,un),t(I,Lt),t(I,gn),t(I,Jt),l(e,vo,a),g(Ye,e,a),l(e,wo,a),l(e,J,a),g(Qe,J,null),t(J,fn),t(J,Ft),t(J,_n),t(J,It),t(J,bn),t(J,N),g(Ke,N,null),t(N,yn),t(N,Nt),t(N,kn),g(ne,N,null),t(N,Tn),g(se,N,null),l(e,xo,a),g(et,e,a),l(e,Mo,a),l(e,L,a),g(tt,L,null),t(L,vn),t(L,Bt),t(L,wn),t(L,Gt),t(L,xn),t(L,Pt),t(L,Mn),t(L,B),g(ot,B,null),t(B,Un),t(B,Zt),t(B,zn),g(ae,B,null),t(B,$n),g(re,B,null),l(e,Uo,a),g(nt,e,a),l(e,zo,a),l(e,F,a),g(st,F,null),t(F,jn),t(F,Wt),t(F,Cn),t(F,Rt),t(F,qn),t(F,G),g(at,G,null),t(G,Ln),t(G,Ht),t(G,Jn),g(ie,G,null),t(G,Fn),g(de,G,null),l(e,$o,a),g(rt,e,a),l(e,jo,a),l(e,Ot,a),Co=!0},p(e,[a]){const V={};a&2&&(V.$$scope={dirty:a,ctx:e}),K.$set(V);const q={};a&2&&(q.$$scope={dirty:a,ctx:e}),oe.$set(q);const S={};a&2&&(S.$$scope={dirty:a,ctx:e}),ne.$set(S);const it={};a&2&&(it.$$scope={dirty:a,ctx:e}),se.$set(it);const dt={};a&2&&(dt.$$scope={dirty:a,ctx:e}),ae.$set(dt);const Vt={};a&2&&(Vt.$$scope={dirty:a,ctx:e}),re.$set(Vt);const M={};a&2&&(M.$$scope={dirty:a,ctx:e}),ie.$set(M);const A={};a&2&&(A.$$scope={dirty:a,ctx:e}),de.$set(A)},i(e){Co||(f(x.$$.fragment,e),f(fe.$$.fragment,e),f(Te.$$.fragment,e),f(we.$$.fragment,e),f(Me.$$.fragment,e),f(je.$$.fragment,e),f(Le.$$.fragment,e),f(Je.$$.fragment,e),f(Fe.$$.fragment,e),f(Ie.$$.fragment,e),f(Ne.$$.fragment,e),f(Be.$$.fragment,e),f(Ge.$$.fragment,e),f(Pe.$$.fragment,e),f(Ze.$$.fragment,e),f(We.$$.fragment,e),f(Re.$$.fragment,e),f(K.$$.fragment,e),f(He.$$.fragment,e),f(De.$$.fragment,e),f(Ee.$$.fragment,e),f(Oe.$$.fragment,e),f(Ve.$$.fragment,e),f(oe.$$.fragment,e),f(Se.$$.fragment,e),f(Ae.$$.fragment,e),f(Xe.$$.fragment,e),f(Ye.$$.fragment,e),f(Qe.$$.fragment,e),f(Ke.$$.fragment,e),f(ne.$$.fragment,e),f(se.$$.fragment,e),f(et.$$.fragment,e),f(tt.$$.fragment,e),f(ot.$$.fragment,e),f(ae.$$.fragment,e),f(re.$$.fragment,e),f(nt.$$.fragment,e),f(st.$$.fragment,e),f(at.$$.fragment,e),f(ie.$$.fragment,e),f(de.$$.fragment,e),f(rt.$$.fragment,e),Co=!0)},o(e){_(x.$$.fragment,e),_(fe.$$.fragment,e),_(Te.$$.fragment,e),_(we.$$.fragment,e),_(Me.$$.fragment,e),_(je.$$.fragment,e),_(Le.$$.fragment,e),_(Je.$$.fragment,e),_(Fe.$$.fragment,e),_(Ie.$$.fragment,e),_(Ne.$$.fragment,e),_(Be.$$.fragment,e),_(Ge.$$.fragment,e),_(Pe.$$.fragment,e),_(Ze.$$.fragment,e),_(We.$$.fragment,e),_(Re.$$.fragment,e),_(K.$$.fragment,e),_(He.$$.fragment,e),_(De.$$.fragment,e),_(Ee.$$.fragment,e),_(Oe.$$.fragment,e),_(Ve.$$.fragment,e),_(oe.$$.fragment,e),_(Se.$$.fragment,e),_(Ae.$$.fragment,e),_(Xe.$$.fragment,e),_(Ye.$$.fragment,e),_(Qe.$$.fragment,e),_(Ke.$$.fragment,e),_(ne.$$.fragment,e),_(se.$$.fragment,e),_(et.$$.fragment,e),_(tt.$$.fragment,e),_(ot.$$.fragment,e),_(ae.$$.fragment,e),_(re.$$.fragment,e),_(nt.$$.fragment,e),_(st.$$.fragment,e),_(at.$$.fragment,e),_(ie.$$.fragment,e),_(de.$$.fragment,e),_(rt.$$.fragment,e),Co=!1},d(e){e&&(s(k),s(p),s(y),s(m),s(z),s(Xt),s(Yt),s(_e),s(Qt),s(be),s(Kt),s(ye),s(eo),s(X),s(to),s(ke),s(oo),s(no),s(ve),s(so),s(ao),s(xe),s(ro),s(io),s(Ue),s(lo),s(ze),s(co),s($e),s(po),s(mo),s(Ce),s(ho),s(qe),s(uo),s(go),s(Z),s(fo),s(_o),s($),s(bo),s(yo),s(v),s(ko),s(To),s(C),s(vo),s(wo),s(J),s(xo),s(Mo),s(L),s(Uo),s(zo),s(F),s($o),s(jo),s(Ot)),s(d),b(x,e),b(fe,e),b(Te,e),b(we,e),b(Me,e),b(je,e),b(Le,e),b(Je),b(Fe,e),b(Ie),b(Ne),b(Be),b(Ge),b(Pe),b(Ze,e),b(We),b(Re),b(K),b(He),b(De),b(Ee),b(Oe),b(Ve),b(oe),b(Se,e),b(Ae),b(Xe),b(Ye,e),b(Qe),b(Ke),b(ne),b(se),b(et,e),b(tt),b(ot),b(ae),b(re),b(nt,e),b(st),b(at),b(ie),b(de),b(rt,e)}}}const Es='{"title":"UDOP","local":"udop","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"UdopConfig","local":"transformers.UdopConfig","sections":[],"depth":2},{"title":"UdopTokenizer","local":"transformers.UdopTokenizer","sections":[],"depth":2},{"title":"UdopTokenizerFast","local":"transformers.UdopTokenizerFast","sections":[],"depth":2},{"title":"UdopProcessor","local":"transformers.UdopProcessor","sections":[],"depth":2},{"title":"UdopModel","local":"transformers.UdopModel","sections":[],"depth":2},{"title":"UdopForConditionalGeneration","local":"transformers.UdopForConditionalGeneration","sections":[],"depth":2},{"title":"UdopEncoderModel","local":"transformers.UdopEncoderModel","sections":[],"depth":2}],"depth":1}';function Os(j){return qs(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ea extends Ls{constructor(d){super(),Js(this,d,Os,Ds,js,{})}}export{ea as component};
