import{s as cs,o as ps,n as P}from"../chunks/scheduler.9bc65507.js";import{S as hs,i as ms,g as s,s as l,u as g,A as fs,h as r,f as o,c as d,j as u,v as _,y as m,k as f,o as n,a as c,w as b,d as y,t as k,x as T}from"../chunks/index.78c82d43.js";import{T as Ut}from"../chunks/Tip.87d55b76.js";import{D as S}from"../chunks/Docstring.4e7352e2.js";import{C as to}from"../chunks/CodeBlock.73e038be.js";import{I as _e}from"../chunks/IconCopyLink.bedaa44d.js";import{E as Po}from"../chunks/ExampleCodeBlock.872b014d.js";function us(x){let i,M="Examples:",p,h,v;return h=new to({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJyb3NDb25maWclMkMlMjBCcm9zTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQlJPUyUyMGppbmhvODM0NSUyRmJyb3MtYmFzZS11bmNhc2VkJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMEJyb3NDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMGZyb20lMjB0aGUlMjBqaW5obzgzNDUlMkZicm9zLWJhc2UtdW5jYXNlZCUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwQnJvc01vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BrosConfig, BrosModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BROS jinho8345/bros-base-uncased style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BrosConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the jinho8345/bros-base-uncased style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BrosModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`,wrap:!1}}),{c(){i=s("p"),i.textContent=M,p=l(),g(h.$$.fragment)},l(a){i=r(a,"P",{"data-svelte-h":!0}),m(i)!=="svelte-kvfsh7"&&(i.textContent=M),p=d(a),_(h.$$.fragment,a)},m(a,w){c(a,i,w),c(a,p,w),b(h,a,w),v=!0},p:P,i(a){v||(y(h.$$.fragment,a),v=!0)},o(a){k(h.$$.fragment,a),v=!1},d(a){a&&(o(i),o(p)),T(h,a)}}}function gs(x){let i,M=`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(){i=s("p"),i.innerHTML=M},l(p){i=r(p,"P",{"data-svelte-h":!0}),m(i)!=="svelte-fincs2"&&(i.innerHTML=M)},m(p,h){c(p,i,h)},p:P,d(p){p&&o(i)}}}function _s(x){let i,M="Examples:",p,h,v;return h=new to({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQnJvc1Byb2Nlc3NvciUyQyUyMEJyb3NNb2RlbCUwQSUwQXByb2Nlc3NvciUyMCUzRCUyMEJyb3NQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmppbmhvODM0NSUyRmJyb3MtYmFzZS11bmNhc2VkJTIyKSUwQSUwQW1vZGVsJTIwJTNEJTIwQnJvc01vZGVsLmZyb21fcHJldHJhaW5lZCglMjJqaW5obzgzNDUlMkZicm9zLWJhc2UtdW5jYXNlZCUyMiklMEElMEFlbmNvZGluZyUyMCUzRCUyMHByb2Nlc3NvciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNERmFsc2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQWJib3glMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCJTVCJTVCMCUyQyUyMDAlMkMlMjAxJTJDJTIwMSU1RCU1RCU1RCkucmVwZWF0KDElMkMlMjBlbmNvZGluZyU1QiUyMmlucHV0X2lkcyUyMiU1RC5zaGFwZSU1Qi0xJTVEJTJDJTIwMSklMEFlbmNvZGluZyU1QiUyMmJib3glMjIlNUQlMjAlM0QlMjBiYm94JTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqZW5jb2RpbmcpJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BrosProcessor, BrosModel

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = BrosProcessor.from_pretrained(<span class="hljs-string">&quot;jinho8345/bros-base-uncased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>model = BrosModel.from_pretrained(<span class="hljs-string">&quot;jinho8345/bros-base-uncased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>bbox = torch.tensor([[[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]]]).repeat(<span class="hljs-number">1</span>, encoding[<span class="hljs-string">&quot;input_ids&quot;</span>].shape[-<span class="hljs-number">1</span>], <span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding[<span class="hljs-string">&quot;bbox&quot;</span>] = bbox

<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(){i=s("p"),i.textContent=M,p=l(),g(h.$$.fragment)},l(a){i=r(a,"P",{"data-svelte-h":!0}),m(i)!=="svelte-kvfsh7"&&(i.textContent=M),p=d(a),_(h.$$.fragment,a)},m(a,w){c(a,i,w),c(a,p,w),b(h,a,w),v=!0},p:P,i(a){v||(y(h.$$.fragment,a),v=!0)},o(a){k(h.$$.fragment,a),v=!1},d(a){a&&(o(i),o(p)),T(h,a)}}}function bs(x){let i,M=`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(){i=s("p"),i.innerHTML=M},l(p){i=r(p,"P",{"data-svelte-h":!0}),m(i)!=="svelte-fincs2"&&(i.innerHTML=M)},m(p,h){c(p,i,h)},p:P,d(p){p&&o(i)}}}function ys(x){let i,M="Examples:",p,h,v;return h=new to({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQnJvc1Byb2Nlc3NvciUyQyUyMEJyb3NGb3JUb2tlbkNsYXNzaWZpY2F0aW9uJTBBJTBBcHJvY2Vzc29yJTIwJTNEJTIwQnJvc1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyamluaG84MzQ1JTJGYnJvcy1iYXNlLXVuY2FzZWQlMjIpJTBBJTBBbW9kZWwlMjAlM0QlMjBCcm9zRm9yVG9rZW5DbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyamluaG84MzQ1JTJGYnJvcy1iYXNlLXVuY2FzZWQlMjIpJTBBJTBBZW5jb2RpbmclMjAlM0QlMjBwcm9jZXNzb3IoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMGFkZF9zcGVjaWFsX3Rva2VucyUzREZhbHNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFiYm94JTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QiU1QiU1QjAlMkMlMjAwJTJDJTIwMSUyQyUyMDElNUQlNUQlNUQpLnJlcGVhdCgxJTJDJTIwZW5jb2RpbmclNUIlMjJpbnB1dF9pZHMlMjIlNUQuc2hhcGUlNUItMSU1RCUyQyUyMDEpJTBBZW5jb2RpbmclNUIlMjJiYm94JTIyJTVEJTIwJTNEJTIwYmJveCUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmVuY29kaW5nKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BrosProcessor, BrosForTokenClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = BrosProcessor.from_pretrained(<span class="hljs-string">&quot;jinho8345/bros-base-uncased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>model = BrosForTokenClassification.from_pretrained(<span class="hljs-string">&quot;jinho8345/bros-base-uncased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>bbox = torch.tensor([[[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]]]).repeat(<span class="hljs-number">1</span>, encoding[<span class="hljs-string">&quot;input_ids&quot;</span>].shape[-<span class="hljs-number">1</span>], <span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding[<span class="hljs-string">&quot;bbox&quot;</span>] = bbox

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding)`,wrap:!1}}),{c(){i=s("p"),i.textContent=M,p=l(),g(h.$$.fragment)},l(a){i=r(a,"P",{"data-svelte-h":!0}),m(i)!=="svelte-kvfsh7"&&(i.textContent=M),p=d(a),_(h.$$.fragment,a)},m(a,w){c(a,i,w),c(a,p,w),b(h,a,w),v=!0},p:P,i(a){v||(y(h.$$.fragment,a),v=!0)},o(a){k(h.$$.fragment,a),v=!1},d(a){a&&(o(i),o(p)),T(h,a)}}}function ks(x){let i,M=`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(){i=s("p"),i.innerHTML=M},l(p){i=r(p,"P",{"data-svelte-h":!0}),m(i)!=="svelte-fincs2"&&(i.innerHTML=M)},m(p,h){c(p,i,h)},p:P,d(p){p&&o(i)}}}function Ts(x){let i,M="Examples:",p,h,v;return h=new to({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQnJvc1Byb2Nlc3NvciUyQyUyMEJyb3NTcGFkZUVFRm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUwQSUwQXByb2Nlc3NvciUyMCUzRCUyMEJyb3NQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmppbmhvODM0NSUyRmJyb3MtYmFzZS11bmNhc2VkJTIyKSUwQSUwQW1vZGVsJTIwJTNEJTIwQnJvc1NwYWRlRUVGb3JUb2tlbkNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJqaW5obzgzNDUlMkZicm9zLWJhc2UtdW5jYXNlZCUyMiklMEElMEFlbmNvZGluZyUyMCUzRCUyMHByb2Nlc3NvciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNERmFsc2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQWJib3glMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCJTVCJTVCMCUyQyUyMDAlMkMlMjAxJTJDJTIwMSU1RCU1RCU1RCkucmVwZWF0KDElMkMlMjBlbmNvZGluZyU1QiUyMmlucHV0X2lkcyUyMiU1RC5zaGFwZSU1Qi0xJTVEJTJDJTIwMSklMEFlbmNvZGluZyU1QiUyMmJib3glMjIlNUQlMjAlM0QlMjBiYm94JTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqZW5jb2Rpbmcp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BrosProcessor, BrosSpadeEEForTokenClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = BrosProcessor.from_pretrained(<span class="hljs-string">&quot;jinho8345/bros-base-uncased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>model = BrosSpadeEEForTokenClassification.from_pretrained(<span class="hljs-string">&quot;jinho8345/bros-base-uncased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>bbox = torch.tensor([[[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]]]).repeat(<span class="hljs-number">1</span>, encoding[<span class="hljs-string">&quot;input_ids&quot;</span>].shape[-<span class="hljs-number">1</span>], <span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding[<span class="hljs-string">&quot;bbox&quot;</span>] = bbox

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding)`,wrap:!1}}),{c(){i=s("p"),i.textContent=M,p=l(),g(h.$$.fragment)},l(a){i=r(a,"P",{"data-svelte-h":!0}),m(i)!=="svelte-kvfsh7"&&(i.textContent=M),p=d(a),_(h.$$.fragment,a)},m(a,w){c(a,i,w),c(a,p,w),b(h,a,w),v=!0},p:P,i(a){v||(y(h.$$.fragment,a),v=!0)},o(a){k(h.$$.fragment,a),v=!1},d(a){a&&(o(i),o(p)),T(h,a)}}}function vs(x){let i,M=`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(){i=s("p"),i.innerHTML=M},l(p){i=r(p,"P",{"data-svelte-h":!0}),m(i)!=="svelte-fincs2"&&(i.innerHTML=M)},m(p,h){c(p,i,h)},p:P,d(p){p&&o(i)}}}function Ms(x){let i,M="Examples:",p,h,v;return h=new to({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQnJvc1Byb2Nlc3NvciUyQyUyMEJyb3NTcGFkZUVMRm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUwQSUwQXByb2Nlc3NvciUyMCUzRCUyMEJyb3NQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmppbmhvODM0NSUyRmJyb3MtYmFzZS11bmNhc2VkJTIyKSUwQSUwQW1vZGVsJTIwJTNEJTIwQnJvc1NwYWRlRUxGb3JUb2tlbkNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJqaW5obzgzNDUlMkZicm9zLWJhc2UtdW5jYXNlZCUyMiklMEElMEFlbmNvZGluZyUyMCUzRCUyMHByb2Nlc3NvciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNERmFsc2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQWJib3glMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCJTVCJTVCMCUyQyUyMDAlMkMlMjAxJTJDJTIwMSU1RCU1RCU1RCkucmVwZWF0KDElMkMlMjBlbmNvZGluZyU1QiUyMmlucHV0X2lkcyUyMiU1RC5zaGFwZSU1Qi0xJTVEJTJDJTIwMSklMEFlbmNvZGluZyU1QiUyMmJib3glMjIlNUQlMjAlM0QlMjBiYm94JTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqZW5jb2Rpbmcp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BrosProcessor, BrosSpadeELForTokenClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = BrosProcessor.from_pretrained(<span class="hljs-string">&quot;jinho8345/bros-base-uncased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>model = BrosSpadeELForTokenClassification.from_pretrained(<span class="hljs-string">&quot;jinho8345/bros-base-uncased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>bbox = torch.tensor([[[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]]]).repeat(<span class="hljs-number">1</span>, encoding[<span class="hljs-string">&quot;input_ids&quot;</span>].shape[-<span class="hljs-number">1</span>], <span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding[<span class="hljs-string">&quot;bbox&quot;</span>] = bbox

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding)`,wrap:!1}}),{c(){i=s("p"),i.textContent=M,p=l(),g(h.$$.fragment)},l(a){i=r(a,"P",{"data-svelte-h":!0}),m(i)!=="svelte-kvfsh7"&&(i.textContent=M),p=d(a),_(h.$$.fragment,a)},m(a,w){c(a,i,w),c(a,p,w),b(h,a,w),v=!0},p:P,i(a){v||(y(h.$$.fragment,a),v=!0)},o(a){k(h.$$.fragment,a),v=!1},d(a){a&&(o(i),o(p)),T(h,a)}}}function ws(x){let i,M,p,h,v,a,w,be,$t,no,un="BROS",Vo,Z,V,Jo,ye,jt,so,gn="Overview",Oo,ke,_n='The BROS model was proposed in <a href="https://arxiv.org/abs/2108.04539" rel="nofollow">BROS: A Pre-trained Language Model Focusing on Text and Layout for Better Key Information Extraction from Documents</a> by Teakgyu Hong, Donghyun Kim, Mingi Ji, Wonseok Hwang, Daehyun Nam, Sungrae Park.',Ho,Te,bn="BROS stands for <em>BERT Relying On Spatiality</em>. It is an encoder-only Transformer model that takes a sequence of tokens and their bounding boxes as inputs and outputs a sequence of hidden states. BROS encode relative spatial information instead of using absolute spatial information.",Xo,ve,yn=`It is pre-trained with two objectives: a token-masked language modeling objective (TMLM) used in BERT, and a novel area-masked language modeling objective (AMLM)
In TMLM, tokens are randomly masked, and the model predicts the masked tokens using spatial information and other unmasked tokens.
AMLM is a 2D version of TMLM. It randomly masks text tokens and predicts with the same information as TMLM, but it masks text blocks (areas).`,Ao,Me,kn=`<code>BrosForTokenClassification</code> has a simple linear layer on top of BrosModel. It predicts the label of each token.
<code>BrosSpadeEEForTokenClassification</code> has an <code>initial_token_classifier</code> and <code>subsequent_token_classifier</code> on top of BrosModel. <code>initial_token_classifier</code> is used to predict the first token of each entity, and <code>subsequent_token_classifier</code> is used to predict the next token of within entity. <code>BrosSpadeELForTokenClassification</code> has an <code>entity_linker</code> on top of BrosModel. <code>entity_linker</code> is used to predict the relation between two entities.`,Do,we,Tn="<code>BrosForTokenClassification</code> and <code>BrosSpadeEEForTokenClassification</code> essentially perform the same job. However, <code>BrosForTokenClassification</code> assumes input tokens are perfectly serialized (which is very challenging task since they exist in a 2D space), while <code>BrosSpadeEEForTokenClassification</code> allows for more flexibility in handling serialization errors as it predicts next connection tokens from one token.",Yo,xe,vn="<code>BrosSpadeELForTokenClassification</code> perform the intra-entity linking task. It predicts relation from one token (of one entity) to another token (of another entity) if these two entities share some relation.",Ko,Ce,Mn="BROS achieves comparable or better result on Key Information Extraction (KIE) benchmarks such as FUNSD, SROIE, CORD and SciTSR, without relying on explicit visual features.",et,Be,wn="The abstract from the paper is the following:",ot,Ue,xn="<em>Key information extraction (KIE) from document images requires understanding the contextual and spatial semantics of texts in two-dimensional (2D) space. Many recent studies try to solve the task by developing pre-trained language models focusing on combining visual features from document images with texts and their layout. On the other hand, this paper tackles the problem by going back to the basic: effective combination of text and layout. Specifically, we propose a pre-trained language model, named BROS (BERT Relying On Spatiality), that encodes relative positions of texts in 2D space and learns from unlabeled documents with area-masking strategy. With this optimized training scheme for understanding texts in 2D space, BROS shows comparable or better performance compared to previous methods on four KIE benchmarks (FUNSD, SROIE</em>, CORD, and SciTSR) without relying on visual features. This paper also reveals two real-world challenges in KIE tasks-(1) minimizing the error from incorrect text ordering and (2) efficient learning from fewer downstream examples-and demonstrates the superiority of BROS over previous methods.*",tt,$e,Cn="Tips:",nt,je,Bn='<li><a href="/docs/transformers/v4.34.0/en/model_doc/bros#transformers.BrosModel.forward">forward()</a> requires <code>input_ids</code> and <code>bbox</code> (bounding box). Each bounding box should be in (x0, y0, x1, y1) format (top-left corner, bottom-right corner). Obtaining of Bounding boxes depends on external OCR system. The <code>x</code> coordinate should be normalized by document image width, and the <code>y</code> coordinate should be normalized by document image height.</li>',st,Je,rt,Fe,Un="<li>[<code>~transformers.BrosForTokenClassification.forward</code>, <code>~transformers.BrosSpadeEEForTokenClassification.forward</code>, <code>~transformers.BrosSpadeEEForTokenClassification.forward</code>] require not only <code>input_ids</code> and <code>bbox</code> but also <code>box_first_token_mask</code> for loss calculation. It is a mask to filter out non-first tokens of each box. You can obtain this mask by saving start token indices of bounding boxes when creating <code>input_ids</code> from words. You can make <code>box_first_token_mask</code> with following code,</li>",at,ze,it,Ee,$n='<li>Demo scripts can be found <a href="https://github.com/clovaai/bros" rel="nofollow">here</a>.</li>',lt,Ne,jn='This model was contributed by <a href="https://huggingface.co/jinho8345" rel="nofollow">jinho8345</a>. The original code can be found <a href="https://github.com/clovaai/bros" rel="nofollow">here</a>.',dt,W,O,Fo,Se,Jt,ro,Jn="BrosConfig",ct,C,Ie,Ft,ao,Fn=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.34.0/en/model_doc/bros#transformers.BrosModel">BrosModel</a> or a <code>TFBrosModel</code>. It is used to
instantiate a Bros 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 Bros
<a href="https://huggingface.co/jinho8345/bros-base-uncased" rel="nofollow">jinho8345/bros-base-uncased</a> architecture.`,zt,io,zn=`Configuration objects inherit from <a href="/docs/transformers/v4.34.0/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/v4.34.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Et,H,pt,q,X,zo,Ze,Nt,lo,En="BrosProcessor",ht,B,We,St,co,Nn="Constructs a Bros processor which wraps a BERT tokenizer.",It,po,Sn=`<a href="/docs/transformers/v4.34.0/en/model_doc/bros#transformers.BrosProcessor">BrosProcessor</a> offers all the functionalities of <a href="/docs/transformers/v4.34.0/en/model_doc/bert#transformers.BertTokenizerFast">BertTokenizerFast</a>. See the docstring of
<a href="/docs/transformers/v4.34.0/en/model_doc/bros#transformers.BrosProcessor.__call__"><strong>call</strong>()</a> and <code>decode()</code> for more information.`,Zt,I,qe,Wt,ho,In='This method uses <a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__call__">BertTokenizerFast.<strong>call</strong>()</a> to prepare text for the model.',qt,mo,Zn="Please refer to the docstring of the above two methods for more information.",mt,R,A,Eo,Re,Rt,fo,Wn="BrosModel",ft,N,Ge,Gt,uo,qn=`The bare Bros Model transformer outputting raw hidden-states without any specific head on top.
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.`,Lt,J,Le,Qt,go,Rn='The <a href="/docs/transformers/v4.34.0/en/model_doc/bros#transformers.BrosModel">BrosModel</a> forward method, overrides the <code>__call__</code> special method.',Pt,D,Vt,Y,ut,G,K,No,Qe,Ot,_o,Gn="BrosForTokenClassification",gt,U,Pe,Ht,bo,Ln=`Bros Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`,Xt,yo,Qn=`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.`,At,F,Ve,Dt,ko,Pn='The <a href="/docs/transformers/v4.34.0/en/model_doc/bros#transformers.BrosForTokenClassification">BrosForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',Yt,ee,Kt,oe,_t,L,te,So,Oe,en,To,Vn="BrosSpadeEEForTokenClassification",bt,$,He,on,vo,On=`Bros Model with a token classification head on top (initial_token_layers and subsequent_token_layer on top of the
hidden-states output) e.g. for Named-Entity-Recognition (NER) tasks. The initial_token_classifier is used to
predict the first token of each entity, and the subsequent_token_classifier is used to predict the subsequent
tokens within an entity. Compared to BrosForTokenClassification, this model is more robust to serialization errors
since it predicts next token from one token.`,tn,Mo,Hn=`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.`,nn,z,Xe,sn,wo,Xn='The <a href="/docs/transformers/v4.34.0/en/model_doc/bros#transformers.BrosSpadeEEForTokenClassification">BrosSpadeEEForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',rn,ne,an,se,yt,Q,re,Io,Ae,ln,xo,An="BrosSpadeELForTokenClassification",kt,j,De,dn,Co,Dn=`Bros Model with a token classification head on top (a entity_linker layer on top of the hidden-states output) e.g.
for Entity-Linking. The entity_linker is used to predict intra-entity links (one entity to another entity).`,cn,Bo,Yn=`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.`,pn,E,Ye,hn,Uo,Kn='The <a href="/docs/transformers/v4.34.0/en/model_doc/bros#transformers.BrosSpadeELForTokenClassification">BrosSpadeELForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',mn,ae,fn,ie,Tt,Zo,vt;return be=new _e({}),ye=new _e({}),Je=new to({props:{code:"ZGVmJTIwZXhwYW5kX2FuZF9ub3JtYWxpemVfYmJveChiYm94ZXMlMkMlMjBkb2Nfd2lkdGglMkMlMjBkb2NfaGVpZ2h0KSUzQSUwQSUyMCUyMCUyMCUyMCUyMyUyMGhlcmUlMkMlMjBiYm94ZXMlMjBhcmUlMjBudW1weSUyMGFycmF5JTBBJTBBJTIwJTIwJTIwJTIwJTIzJTIwTm9ybWFsaXplJTIwYmJveCUyMC0lM0UlMjAwJTIwfiUyMDElMEElMjAlMjAlMjAlMjBiYm94ZXMlNUIlM0ElMkMlMjAlNUIwJTJDJTIwMiU1RCU1RCUyMCUzRCUyMGJib3hlcyU1QiUzQSUyQyUyMCU1QjAlMkMlMjAyJTVEJTVEJTIwJTJGJTIwd2lkdGglMEElMjAlMjAlMjAlMjBiYm94ZXMlNUIlM0ElMkMlMjAlNUIxJTJDJTIwMyU1RCU1RCUyMCUzRCUyMGJib3hlcyU1QiUzQSUyQyUyMCU1QjElMkMlMjAzJTVEJTVEJTIwJTJGJTIwaGVpZ2h0",highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">expand_and_normalize_bbox</span>(<span class="hljs-params">bboxes, doc_width, doc_height</span>):
    <span class="hljs-comment"># here, bboxes are numpy array</span>

    <span class="hljs-comment"># Normalize bbox -&gt; 0 ~ 1</span>
    bboxes[:, [<span class="hljs-number">0</span>, <span class="hljs-number">2</span>]] = bboxes[:, [<span class="hljs-number">0</span>, <span class="hljs-number">2</span>]] / width
    bboxes[:, [<span class="hljs-number">1</span>, <span class="hljs-number">3</span>]] = bboxes[:, [<span class="hljs-number">1</span>, <span class="hljs-number">3</span>]] / height`,wrap:!1}}),ze=new to({props:{code:"ZGVmJTIwbWFrZV9ib3hfZmlyc3RfdG9rZW5fbWFzayhiYm94ZXMlMkMlMjB3b3JkcyUyQyUyMHRva2VuaXplciUyQyUyMG1heF9zZXFfbGVuZ3RoJTNENTEyKSUzQSUwQSUwQSUyMCUyMCUyMCUyMGJveF9maXJzdF90b2tlbl9tYXNrJTIwJTNEJTIwbnAuemVyb3MobWF4X3NlcV9sZW5ndGglMkMlMjBkdHlwZSUzRG5wLmJvb2xfKSUwQSUwQSUyMCUyMCUyMCUyMCUyMyUyMGVuY29kZSh0b2tlbml6ZSklMjBlYWNoJTIwd29yZCUyMGZyb20lMjB3b3JkcyUyMChMaXN0JTVCc3RyJTVEKSUwQSUyMCUyMCUyMCUyMGlucHV0X2lkc19saXN0JTNBJTIwTGlzdCU1Qkxpc3QlNUJpbnQlNUQlNUQlMjAlM0QlMjAlNUJ0b2tlbml6ZXIuZW5jb2RlKGUlMkMlMjBhZGRfc3BlY2lhbF90b2tlbnMlM0RGYWxzZSklMjBmb3IlMjBlJTIwaW4lMjB3b3JkcyU1RCUwQSUwQSUyMCUyMCUyMCUyMCUyMyUyMGdldCUyMHRoZSUyMGxlbmd0aCUyMG9mJTIwZWFjaCUyMGJveCUwQSUyMCUyMCUyMCUyMHRva2Vuc19sZW5ndGhfbGlzdCUzQSUyMExpc3QlNUJpbnQlNUQlMjAlM0QlMjAlNUJsZW4obCklMjBmb3IlMjBsJTIwaW4lMjBpbnB1dF9pZHNfbGlzdCU1RCUwQSUwQSUyMCUyMCUyMCUyMGJveF9lbmRfdG9rZW5faW5kaWNlcyUyMCUzRCUyMG5wLmFycmF5KGxpc3QoaXRlcnRvb2xzLmFjY3VtdWxhdGUodG9rZW5zX2xlbmd0aF9saXN0KSkpJTBBJTIwJTIwJTIwJTIwYm94X3N0YXJ0X3Rva2VuX2luZGljZXMlMjAlM0QlMjBib3hfZW5kX3Rva2VuX2luZGljZXMlMjAtJTIwbnAuYXJyYXkodG9rZW5zX2xlbmd0aF9saXN0KSUwQSUwQSUyMCUyMCUyMCUyMCUyMyUyMGZpbHRlciUyMG91dCUyMHRoZSUyMGluZGljZXMlMjB0aGF0JTIwYXJlJTIwb3V0JTIwb2YlMjBtYXhfc2VxX2xlbmd0aCUwQSUyMCUyMCUyMCUyMGJveF9lbmRfdG9rZW5faW5kaWNlcyUyMCUzRCUyMGJveF9lbmRfdG9rZW5faW5kaWNlcyU1QmJveF9lbmRfdG9rZW5faW5kaWNlcyUyMCUzQyUyMG1heF9zZXFfbGVuZ3RoJTIwLSUyMDElNUQlMEElMjAlMjAlMjAlMjBpZiUyMGxlbihib3hfc3RhcnRfdG9rZW5faW5kaWNlcyklMjAlM0UlMjBsZW4oYm94X2VuZF90b2tlbl9pbmRpY2VzKSUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGJveF9zdGFydF90b2tlbl9pbmRpY2VzJTIwJTNEJTIwYm94X3N0YXJ0X3Rva2VuX2luZGljZXMlNUIlM0ElMjBsZW4oYm94X2VuZF90b2tlbl9pbmRpY2VzKSU1RCUwQSUwQSUyMCUyMCUyMCUyMCUyMyUyMHNldCUyMGJveF9zdGFydF90b2tlbl9pbmRpY2VzJTIwdG8lMjBUcnVlJTBBJTIwJTIwJTIwJTIwYm94X2ZpcnN0X3Rva2VuX21hc2slNUJib3hfc3RhcnRfdG9rZW5faW5kaWNlcyU1RCUyMCUzRCUyMFRydWUlMEElMEElMjAlMjAlMjAlMjByZXR1cm4lMjBib3hfZmlyc3RfdG9rZW5fbWFzayUwQQ==",highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">make_box_first_token_mask</span>(<span class="hljs-params">bboxes, words, tokenizer, max_seq_length=<span class="hljs-number">512</span></span>):

    box_first_token_mask = np.zeros(max_seq_length, dtype=np.bool_)

    <span class="hljs-comment"># encode(tokenize) each word from words (List[str])</span>
    input_ids_list: <span class="hljs-type">List</span>[<span class="hljs-type">List</span>[<span class="hljs-built_in">int</span>]] = [tokenizer.encode(e, add_special_tokens=<span class="hljs-literal">False</span>) <span class="hljs-keyword">for</span> e <span class="hljs-keyword">in</span> words]

    <span class="hljs-comment"># get the length of each box</span>
    tokens_length_list: <span class="hljs-type">List</span>[<span class="hljs-built_in">int</span>] = [<span class="hljs-built_in">len</span>(l) <span class="hljs-keyword">for</span> l <span class="hljs-keyword">in</span> input_ids_list]

    box_end_token_indices = np.array(<span class="hljs-built_in">list</span>(itertools.accumulate(tokens_length_list)))
    box_start_token_indices = box_end_token_indices - np.array(tokens_length_list)

    <span class="hljs-comment"># filter out the indices that are out of max_seq_length</span>
    box_end_token_indices = box_end_token_indices[box_end_token_indices &lt; max_seq_length - <span class="hljs-number">1</span>]
    <span class="hljs-keyword">if</span> <span class="hljs-built_in">len</span>(box_start_token_indices) &gt; <span class="hljs-built_in">len</span>(box_end_token_indices):
        box_start_token_indices = box_start_token_indices[: <span class="hljs-built_in">len</span>(box_end_token_indices)]

    <span class="hljs-comment"># set box_start_token_indices to True</span>
    box_first_token_mask[box_start_token_indices] = <span class="hljs-literal">True</span>

    <span class="hljs-keyword">return</span> box_first_token_mask
`,wrap:!1}}),Se=new _e({}),Ie=new S({props:{name:"class transformers.BrosConfig",anchor:"transformers.BrosConfig",parameters:[{name:"vocab_size",val:" = 30522"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"pad_token_id",val:" = 0"},{name:"dim_bbox",val:" = 8"},{name:"bbox_scale",val:" = 100.0"},{name:"n_relations",val:" = 1"},{name:"classifier_dropout_prob",val:" = 0.1"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BrosConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the Bros model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.34.0/en/model_doc/bros#transformers.BrosModel">BrosModel</a> or <code>TFBrosModel</code>.`,name:"vocab_size"},{anchor:"transformers.BrosConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.BrosConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.BrosConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.BrosConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.BrosConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.BrosConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.BrosConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.BrosConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.BrosConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/v4.34.0/en/model_doc/bros#transformers.BrosModel">BrosModel</a> or <code>TFBrosModel</code>.`,name:"type_vocab_size"},{anchor:"transformers.BrosConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.BrosConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.BrosConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The index of the padding token in the token vocabulary.`,name:"pad_token_id"},{anchor:"transformers.BrosConfig.dim_bbox",description:`<strong>dim_bbox</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
The dimension of the bounding box coordinates. (x0, y1, x1, y0, x1, y1, x0, y1)`,name:"dim_bbox"},{anchor:"transformers.BrosConfig.bbox_scale",description:`<strong>bbox_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 100.0) &#x2014;
The scale factor of the bounding box coordinates.`,name:"bbox_scale"},{anchor:"transformers.BrosConfig.n_relations",description:`<strong>n_relations</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of relations for SpadeEE(entity extraction), SpadeEL(entity linking) head.`,name:"n_relations"},{anchor:"transformers.BrosConfig.classifier_dropout_prob",description:`<strong>classifier_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the classifier head.`,name:"classifier_dropout_prob"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/bros/configuration_bros.py#L29"}}),H=new Po({props:{anchor:"transformers.BrosConfig.example",$$slots:{default:[us]},$$scope:{ctx:x}}}),Ze=new _e({}),We=new S({props:{name:"class transformers.BrosProcessor",anchor:"transformers.BrosProcessor",parameters:[{name:"tokenizer",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BrosProcessor.tokenizer",description:"<strong>tokenizer</strong> (<code>BertTokenizerFast</code>) &#x2014;\nAn instance of [&#x2018;BertTokenizerFast`]. The tokenizer is a required input.",name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/bros/processing_bros.py#L26"}}),qe=new S({props:{name:"__call__",anchor:"transformers.BrosProcessor.__call__",parameters:[{name:"text",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = 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:"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:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/bros/processing_bros.py#L46"}}),Re=new _e({}),Ge=new S({props:{name:"class transformers.BrosModel",anchor:"transformers.BrosModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.BrosModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/bros#transformers.BrosConfig">BrosConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.34.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/bros/modeling_bros.py#L794"}}),Le=new S({props:{name:"forward",anchor:"transformers.BrosModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"bbox",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BrosModel.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.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.34.0/en/model_doc/bros#transformers.BrosProcessor">BrosProcessor</a>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BrosModel.forward.bbox",description:`<strong>bbox</strong> (&#x2018;torch.FloatTensor&#x2019; of shape &#x2018;(batch_size, num_boxes, 4)&#x2019;) &#x2014;
Bounding box coordinates for each token in the input sequence. Each bounding box is a list of four values
(x1, y1, x2, y2), where (x1, y1) is the top left corner, and (x2, y2) is the bottom right corner of the
bounding box.`,name:"bbox"},{anchor:"transformers.BrosModel.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.BrosModel.forward.bbox_first_token_mask",description:`<strong>bbox_first_token_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the first token of each bounding box. 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>`,name:"bbox_first_token_mask"},{anchor:"transformers.BrosModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.BrosModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.BrosModel.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.BrosModel.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.BrosModel.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.BrosModel.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.BrosModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/bros/modeling_bros.py#L821",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.34.0/en/model_doc/bros#transformers.BrosConfig"
>BrosConfig</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 model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=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>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 optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),D=new Ut({props:{$$slots:{default:[gs]},$$scope:{ctx:x}}}),Y=new Po({props:{anchor:"transformers.BrosModel.forward.example",$$slots:{default:[_s]},$$scope:{ctx:x}}}),Qe=new _e({}),Pe=new S({props:{name:"class transformers.BrosForTokenClassification",anchor:"transformers.BrosForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BrosForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/bros#transformers.BrosConfig">BrosConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.34.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/bros/modeling_bros.py#L972"}}),Ve=new S({props:{name:"forward",anchor:"transformers.BrosForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"bbox",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"bbox_first_token_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",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.BrosForTokenClassification.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.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.34.0/en/model_doc/bros#transformers.BrosProcessor">BrosProcessor</a>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BrosForTokenClassification.forward.bbox",description:`<strong>bbox</strong> (&#x2018;torch.FloatTensor&#x2019; of shape &#x2018;(batch_size, num_boxes, 4)&#x2019;) &#x2014;
Bounding box coordinates for each token in the input sequence. Each bounding box is a list of four values
(x1, y1, x2, y2), where (x1, y1) is the top left corner, and (x2, y2) is the bottom right corner of the
bounding box.`,name:"bbox"},{anchor:"transformers.BrosForTokenClassification.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.BrosForTokenClassification.forward.bbox_first_token_mask",description:`<strong>bbox_first_token_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the first token of each bounding box. 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>`,name:"bbox_first_token_mask"},{anchor:"transformers.BrosForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.BrosForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.BrosForTokenClassification.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.BrosForTokenClassification.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.BrosForTokenClassification.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.BrosForTokenClassification.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.BrosForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/bros/modeling_bros.py#L988",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.34.0/en/model_doc/bros#transformers.BrosConfig"
>BrosConfig</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)  — Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) — Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ee=new Ut({props:{$$slots:{default:[bs]},$$scope:{ctx:x}}}),oe=new Po({props:{anchor:"transformers.BrosForTokenClassification.forward.example",$$slots:{default:[ys]},$$scope:{ctx:x}}}),Oe=new _e({}),He=new S({props:{name:"class transformers.BrosSpadeEEForTokenClassification",anchor:"transformers.BrosSpadeEEForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BrosSpadeEEForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/bros#transformers.BrosConfig">BrosConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.34.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/bros/modeling_bros.py#L1079"}}),Xe=new S({props:{name:"forward",anchor:"transformers.BrosSpadeEEForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"bbox",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"bbox_first_token_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"initial_token_labels",val:": typing.Optional[torch.Tensor] = None"},{name:"subsequent_token_labels",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.BrosSpadeEEForTokenClassification.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.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.34.0/en/model_doc/bros#transformers.BrosProcessor">BrosProcessor</a>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BrosSpadeEEForTokenClassification.forward.bbox",description:`<strong>bbox</strong> (&#x2018;torch.FloatTensor&#x2019; of shape &#x2018;(batch_size, num_boxes, 4)&#x2019;) &#x2014;
Bounding box coordinates for each token in the input sequence. Each bounding box is a list of four values
(x1, y1, x2, y2), where (x1, y1) is the top left corner, and (x2, y2) is the bottom right corner of the
bounding box.`,name:"bbox"},{anchor:"transformers.BrosSpadeEEForTokenClassification.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.BrosSpadeEEForTokenClassification.forward.bbox_first_token_mask",description:`<strong>bbox_first_token_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the first token of each bounding box. 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>`,name:"bbox_first_token_mask"},{anchor:"transformers.BrosSpadeEEForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.BrosSpadeEEForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.BrosSpadeEEForTokenClassification.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.BrosSpadeEEForTokenClassification.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.BrosSpadeEEForTokenClassification.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.BrosSpadeEEForTokenClassification.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.BrosSpadeEEForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/bros/modeling_bros.py#L1107",returnDescription:`
<p>A <code>transformers.models.bros.modeling_bros.BrosSpadeOutput</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/v4.34.0/en/model_doc/bros#transformers.BrosConfig"
>BrosConfig</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)  — Classification loss.</p>
</li>
<li>
<p><strong>initial_token_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) — Classification scores for entity initial tokens (before SoftMax).</p>
</li>
<li>
<p><strong>subsequent_token_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, sequence_length+1)</code>) — Classification scores for entity sequence tokens (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.models.bros.modeling_bros.BrosSpadeOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ne=new Ut({props:{$$slots:{default:[ks]},$$scope:{ctx:x}}}),se=new Po({props:{anchor:"transformers.BrosSpadeEEForTokenClassification.forward.example",$$slots:{default:[Ts]},$$scope:{ctx:x}}}),Ae=new _e({}),De=new S({props:{name:"class transformers.BrosSpadeELForTokenClassification",anchor:"transformers.BrosSpadeELForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BrosSpadeELForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/bros#transformers.BrosConfig">BrosConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.34.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/bros/modeling_bros.py#L1222"}}),Ye=new S({props:{name:"forward",anchor:"transformers.BrosSpadeELForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"bbox",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"bbox_first_token_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",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.BrosSpadeELForTokenClassification.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.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.34.0/en/model_doc/bros#transformers.BrosProcessor">BrosProcessor</a>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BrosSpadeELForTokenClassification.forward.bbox",description:`<strong>bbox</strong> (&#x2018;torch.FloatTensor&#x2019; of shape &#x2018;(batch_size, num_boxes, 4)&#x2019;) &#x2014;
Bounding box coordinates for each token in the input sequence. Each bounding box is a list of four values
(x1, y1, x2, y2), where (x1, y1) is the top left corner, and (x2, y2) is the bottom right corner of the
bounding box.`,name:"bbox"},{anchor:"transformers.BrosSpadeELForTokenClassification.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.BrosSpadeELForTokenClassification.forward.bbox_first_token_mask",description:`<strong>bbox_first_token_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the first token of each bounding box. 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>`,name:"bbox_first_token_mask"},{anchor:"transformers.BrosSpadeELForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.BrosSpadeELForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.BrosSpadeELForTokenClassification.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.BrosSpadeELForTokenClassification.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.BrosSpadeELForTokenClassification.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.BrosSpadeELForTokenClassification.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.BrosSpadeELForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/bros/modeling_bros.py#L1239",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.34.0/en/model_doc/bros#transformers.BrosConfig"
>BrosConfig</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)  — Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) — Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ae=new Ut({props:{$$slots:{default:[vs]},$$scope:{ctx:x}}}),ie=new Po({props:{anchor:"transformers.BrosSpadeELForTokenClassification.forward.example",$$slots:{default:[Ms]},$$scope:{ctx:x}}}),{c(){i=s("meta"),M=l(),p=s("p"),h=l(),v=s("h1"),a=s("a"),w=s("span"),g(be.$$.fragment),$t=l(),no=s("span"),no.textContent=un,Vo=l(),Z=s("h2"),V=s("a"),Jo=s("span"),g(ye.$$.fragment),jt=l(),so=s("span"),so.textContent=gn,Oo=l(),ke=s("p"),ke.innerHTML=_n,Ho=l(),Te=s("p"),Te.innerHTML=bn,Xo=l(),ve=s("p"),ve.textContent=yn,Ao=l(),Me=s("p"),Me.innerHTML=kn,Do=l(),we=s("p"),we.innerHTML=Tn,Yo=l(),xe=s("p"),xe.innerHTML=vn,Ko=l(),Ce=s("p"),Ce.textContent=Mn,et=l(),Be=s("p"),Be.textContent=wn,ot=l(),Ue=s("p"),Ue.innerHTML=xn,tt=l(),$e=s("p"),$e.textContent=Cn,nt=l(),je=s("ul"),je.innerHTML=Bn,st=l(),g(Je.$$.fragment),rt=l(),Fe=s("ul"),Fe.innerHTML=Un,at=l(),g(ze.$$.fragment),it=l(),Ee=s("ul"),Ee.innerHTML=$n,lt=l(),Ne=s("p"),Ne.innerHTML=jn,dt=l(),W=s("h2"),O=s("a"),Fo=s("span"),g(Se.$$.fragment),Jt=l(),ro=s("span"),ro.textContent=Jn,ct=l(),C=s("div"),g(Ie.$$.fragment),Ft=l(),ao=s("p"),ao.innerHTML=Fn,zt=l(),io=s("p"),io.innerHTML=zn,Et=l(),g(H.$$.fragment),pt=l(),q=s("h2"),X=s("a"),zo=s("span"),g(Ze.$$.fragment),Nt=l(),lo=s("span"),lo.textContent=En,ht=l(),B=s("div"),g(We.$$.fragment),St=l(),co=s("p"),co.textContent=Nn,It=l(),po=s("p"),po.innerHTML=Sn,Zt=l(),I=s("div"),g(qe.$$.fragment),Wt=l(),ho=s("p"),ho.innerHTML=In,qt=l(),mo=s("p"),mo.textContent=Zn,mt=l(),R=s("h2"),A=s("a"),Eo=s("span"),g(Re.$$.fragment),Rt=l(),fo=s("span"),fo.textContent=Wn,ft=l(),N=s("div"),g(Ge.$$.fragment),Gt=l(),uo=s("p"),uo.innerHTML=qn,Lt=l(),J=s("div"),g(Le.$$.fragment),Qt=l(),go=s("p"),go.innerHTML=Rn,Pt=l(),g(D.$$.fragment),Vt=l(),g(Y.$$.fragment),ut=l(),G=s("h2"),K=s("a"),No=s("span"),g(Qe.$$.fragment),Ot=l(),_o=s("span"),_o.textContent=Gn,gt=l(),U=s("div"),g(Pe.$$.fragment),Ht=l(),bo=s("p"),bo.textContent=Ln,Xt=l(),yo=s("p"),yo.innerHTML=Qn,At=l(),F=s("div"),g(Ve.$$.fragment),Dt=l(),ko=s("p"),ko.innerHTML=Pn,Yt=l(),g(ee.$$.fragment),Kt=l(),g(oe.$$.fragment),_t=l(),L=s("h2"),te=s("a"),So=s("span"),g(Oe.$$.fragment),en=l(),To=s("span"),To.textContent=Vn,bt=l(),$=s("div"),g(He.$$.fragment),on=l(),vo=s("p"),vo.textContent=On,tn=l(),Mo=s("p"),Mo.innerHTML=Hn,nn=l(),z=s("div"),g(Xe.$$.fragment),sn=l(),wo=s("p"),wo.innerHTML=Xn,rn=l(),g(ne.$$.fragment),an=l(),g(se.$$.fragment),yt=l(),Q=s("h2"),re=s("a"),Io=s("span"),g(Ae.$$.fragment),ln=l(),xo=s("span"),xo.textContent=An,kt=l(),j=s("div"),g(De.$$.fragment),dn=l(),Co=s("p"),Co.textContent=Dn,cn=l(),Bo=s("p"),Bo.innerHTML=Yn,pn=l(),E=s("div"),g(Ye.$$.fragment),hn=l(),Uo=s("p"),Uo.innerHTML=Kn,mn=l(),g(ae.$$.fragment),fn=l(),g(ie.$$.fragment),Tt=l(),Zo=s("p"),this.h()},l(e){const t=fs("svelte-1phssyn",document.head);i=r(t,"META",{name:!0,content:!0}),t.forEach(o),M=d(e),p=r(e,"P",{}),u(p).forEach(o),h=d(e),v=r(e,"H1",{class:!0});var Ke=u(v);a=r(Ke,"A",{id:!0,class:!0,href:!0});var Wo=u(a);w=r(Wo,"SPAN",{});var qo=u(w);_(be.$$.fragment,qo),qo.forEach(o),Wo.forEach(o),$t=d(Ke),no=r(Ke,"SPAN",{"data-svelte-h":!0}),m(no)!=="svelte-1e2m813"&&(no.textContent=un),Ke.forEach(o),Vo=d(e),Z=r(e,"H2",{class:!0});var eo=u(Z);V=r(eo,"A",{id:!0,class:!0,href:!0});var Ro=u(V);Jo=r(Ro,"SPAN",{});var Go=u(Jo);_(ye.$$.fragment,Go),Go.forEach(o),Ro.forEach(o),jt=d(eo),so=r(eo,"SPAN",{"data-svelte-h":!0}),m(so)!=="svelte-1jsw1pg"&&(so.textContent=gn),eo.forEach(o),Oo=d(e),ke=r(e,"P",{"data-svelte-h":!0}),m(ke)!=="svelte-wn68vq"&&(ke.innerHTML=_n),Ho=d(e),Te=r(e,"P",{"data-svelte-h":!0}),m(Te)!=="svelte-x3aljh"&&(Te.innerHTML=bn),Xo=d(e),ve=r(e,"P",{"data-svelte-h":!0}),m(ve)!=="svelte-a4zidq"&&(ve.textContent=yn),Ao=d(e),Me=r(e,"P",{"data-svelte-h":!0}),m(Me)!=="svelte-gnae6o"&&(Me.innerHTML=kn),Do=d(e),we=r(e,"P",{"data-svelte-h":!0}),m(we)!=="svelte-1cpns1a"&&(we.innerHTML=Tn),Yo=d(e),xe=r(e,"P",{"data-svelte-h":!0}),m(xe)!=="svelte-1mj28ly"&&(xe.innerHTML=vn),Ko=d(e),Ce=r(e,"P",{"data-svelte-h":!0}),m(Ce)!=="svelte-fp1b99"&&(Ce.textContent=Mn),et=d(e),Be=r(e,"P",{"data-svelte-h":!0}),m(Be)!=="svelte-vfdo9a"&&(Be.textContent=wn),ot=d(e),Ue=r(e,"P",{"data-svelte-h":!0}),m(Ue)!=="svelte-1citvm0"&&(Ue.innerHTML=xn),tt=d(e),$e=r(e,"P",{"data-svelte-h":!0}),m($e)!=="svelte-axv494"&&($e.textContent=Cn),nt=d(e),je=r(e,"UL",{"data-svelte-h":!0}),m(je)!=="svelte-50gq70"&&(je.innerHTML=Bn),st=d(e),_(Je.$$.fragment,e),rt=d(e),Fe=r(e,"UL",{"data-svelte-h":!0}),m(Fe)!=="svelte-88mplb"&&(Fe.innerHTML=Un),at=d(e),_(ze.$$.fragment,e),it=d(e),Ee=r(e,"UL",{"data-svelte-h":!0}),m(Ee)!=="svelte-17diifa"&&(Ee.innerHTML=$n),lt=d(e),Ne=r(e,"P",{"data-svelte-h":!0}),m(Ne)!=="svelte-1ys7xl0"&&(Ne.innerHTML=jn),dt=d(e),W=r(e,"H2",{class:!0});var oo=u(W);O=r(oo,"A",{id:!0,class:!0,href:!0});var Lo=u(O);Fo=r(Lo,"SPAN",{});var Qo=u(Fo);_(Se.$$.fragment,Qo),Qo.forEach(o),Lo.forEach(o),Jt=d(oo),ro=r(oo,"SPAN",{"data-svelte-h":!0}),m(ro)!=="svelte-1f4zh0t"&&(ro.textContent=Jn),oo.forEach(o),ct=d(e),C=r(e,"DIV",{class:!0});var le=u(C);_(Ie.$$.fragment,le),Ft=d(le),ao=r(le,"P",{"data-svelte-h":!0}),m(ao)!=="svelte-12vokhn"&&(ao.innerHTML=Fn),zt=d(le),io=r(le,"P",{"data-svelte-h":!0}),m(io)!=="svelte-10kqkkl"&&(io.innerHTML=zn),Et=d(le),_(H.$$.fragment,le),le.forEach(o),pt=d(e),q=r(e,"H2",{class:!0});var Mt=u(q);X=r(Mt,"A",{id:!0,class:!0,href:!0});var es=u(X);zo=r(es,"SPAN",{});var os=u(zo);_(Ze.$$.fragment,os),os.forEach(o),es.forEach(o),Nt=d(Mt),lo=r(Mt,"SPAN",{"data-svelte-h":!0}),m(lo)!=="svelte-wgeqx"&&(lo.textContent=En),Mt.forEach(o),ht=d(e),B=r(e,"DIV",{class:!0});var de=u(B);_(We.$$.fragment,de),St=d(de),co=r(de,"P",{"data-svelte-h":!0}),m(co)!=="svelte-14kb9li"&&(co.textContent=Nn),It=d(de),po=r(de,"P",{"data-svelte-h":!0}),m(po)!=="svelte-1s7oioy"&&(po.innerHTML=Sn),Zt=d(de),I=r(de,"DIV",{class:!0});var $o=u(I);_(qe.$$.fragment,$o),Wt=d($o),ho=r($o,"P",{"data-svelte-h":!0}),m(ho)!=="svelte-9sbexb"&&(ho.innerHTML=In),qt=d($o),mo=r($o,"P",{"data-svelte-h":!0}),m(mo)!=="svelte-ws0hzs"&&(mo.textContent=Zn),$o.forEach(o),de.forEach(o),mt=d(e),R=r(e,"H2",{class:!0});var wt=u(R);A=r(wt,"A",{id:!0,class:!0,href:!0});var ts=u(A);Eo=r(ts,"SPAN",{});var ns=u(Eo);_(Re.$$.fragment,ns),ns.forEach(o),ts.forEach(o),Rt=d(wt),fo=r(wt,"SPAN",{"data-svelte-h":!0}),m(fo)!=="svelte-1f2aawg"&&(fo.textContent=Wn),wt.forEach(o),ft=d(e),N=r(e,"DIV",{class:!0});var jo=u(N);_(Ge.$$.fragment,jo),Gt=d(jo),uo=r(jo,"P",{"data-svelte-h":!0}),m(uo)!=="svelte-5kas2u"&&(uo.innerHTML=qn),Lt=d(jo),J=r(jo,"DIV",{class:!0});var ce=u(J);_(Le.$$.fragment,ce),Qt=d(ce),go=r(ce,"P",{"data-svelte-h":!0}),m(go)!=="svelte-i35y4r"&&(go.innerHTML=Rn),Pt=d(ce),_(D.$$.fragment,ce),Vt=d(ce),_(Y.$$.fragment,ce),ce.forEach(o),jo.forEach(o),ut=d(e),G=r(e,"H2",{class:!0});var xt=u(G);K=r(xt,"A",{id:!0,class:!0,href:!0});var ss=u(K);No=r(ss,"SPAN",{});var rs=u(No);_(Qe.$$.fragment,rs),rs.forEach(o),ss.forEach(o),Ot=d(xt),_o=r(xt,"SPAN",{"data-svelte-h":!0}),m(_o)!=="svelte-1wlp0en"&&(_o.textContent=Gn),xt.forEach(o),gt=d(e),U=r(e,"DIV",{class:!0});var pe=u(U);_(Pe.$$.fragment,pe),Ht=d(pe),bo=r(pe,"P",{"data-svelte-h":!0}),m(bo)!=="svelte-mf69l7"&&(bo.textContent=Ln),Xt=d(pe),yo=r(pe,"P",{"data-svelte-h":!0}),m(yo)!=="svelte-hswkmf"&&(yo.innerHTML=Qn),At=d(pe),F=r(pe,"DIV",{class:!0});var he=u(F);_(Ve.$$.fragment,he),Dt=d(he),ko=r(he,"P",{"data-svelte-h":!0}),m(ko)!=="svelte-182zndr"&&(ko.innerHTML=Pn),Yt=d(he),_(ee.$$.fragment,he),Kt=d(he),_(oe.$$.fragment,he),he.forEach(o),pe.forEach(o),_t=d(e),L=r(e,"H2",{class:!0});var Ct=u(L);te=r(Ct,"A",{id:!0,class:!0,href:!0});var as=u(te);So=r(as,"SPAN",{});var is=u(So);_(Oe.$$.fragment,is),is.forEach(o),as.forEach(o),en=d(Ct),To=r(Ct,"SPAN",{"data-svelte-h":!0}),m(To)!=="svelte-4dqs4a"&&(To.textContent=Vn),Ct.forEach(o),bt=d(e),$=r(e,"DIV",{class:!0});var me=u($);_(He.$$.fragment,me),on=d(me),vo=r(me,"P",{"data-svelte-h":!0}),m(vo)!=="svelte-5z2g1e"&&(vo.textContent=On),tn=d(me),Mo=r(me,"P",{"data-svelte-h":!0}),m(Mo)!=="svelte-hswkmf"&&(Mo.innerHTML=Hn),nn=d(me),z=r(me,"DIV",{class:!0});var fe=u(z);_(Xe.$$.fragment,fe),sn=d(fe),wo=r(fe,"P",{"data-svelte-h":!0}),m(wo)!=="svelte-1yr3xo3"&&(wo.innerHTML=Xn),rn=d(fe),_(ne.$$.fragment,fe),an=d(fe),_(se.$$.fragment,fe),fe.forEach(o),me.forEach(o),yt=d(e),Q=r(e,"H2",{class:!0});var Bt=u(Q);re=r(Bt,"A",{id:!0,class:!0,href:!0});var ls=u(re);Io=r(ls,"SPAN",{});var ds=u(Io);_(Ae.$$.fragment,ds),ds.forEach(o),ls.forEach(o),ln=d(Bt),xo=r(Bt,"SPAN",{"data-svelte-h":!0}),m(xo)!=="svelte-1qrkurp"&&(xo.textContent=An),Bt.forEach(o),kt=d(e),j=r(e,"DIV",{class:!0});var ue=u(j);_(De.$$.fragment,ue),dn=d(ue),Co=r(ue,"P",{"data-svelte-h":!0}),m(Co)!=="svelte-oir21p"&&(Co.textContent=Dn),cn=d(ue),Bo=r(ue,"P",{"data-svelte-h":!0}),m(Bo)!=="svelte-hswkmf"&&(Bo.innerHTML=Yn),pn=d(ue),E=r(ue,"DIV",{class:!0});var ge=u(E);_(Ye.$$.fragment,ge),hn=d(ge),Uo=r(ge,"P",{"data-svelte-h":!0}),m(Uo)!=="svelte-fold0f"&&(Uo.innerHTML=Kn),mn=d(ge),_(ae.$$.fragment,ge),fn=d(ge),_(ie.$$.fragment,ge),ge.forEach(o),ue.forEach(o),Tt=d(e),Zo=r(e,"P",{}),u(Zo).forEach(o),this.h()},h(){f(i,"name","hf:doc:metadata"),f(i,"content",JSON.stringify(xs)),f(a,"id","bros"),f(a,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(a,"href","#bros"),f(v,"class","relative group"),f(V,"id","overview"),f(V,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(V,"href","#overview"),f(Z,"class","relative group"),f(O,"id","transformers.BrosConfig"),f(O,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(O,"href","#transformers.BrosConfig"),f(W,"class","relative group"),f(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(X,"id","transformers.BrosProcessor"),f(X,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(X,"href","#transformers.BrosProcessor"),f(q,"class","relative group"),f(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(A,"id","transformers.BrosModel"),f(A,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(A,"href","#transformers.BrosModel"),f(R,"class","relative group"),f(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(K,"id","transformers.BrosForTokenClassification"),f(K,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(K,"href","#transformers.BrosForTokenClassification"),f(G,"class","relative group"),f(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(te,"id","transformers.BrosSpadeEEForTokenClassification"),f(te,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(te,"href","#transformers.BrosSpadeEEForTokenClassification"),f(L,"class","relative group"),f(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(re,"id","transformers.BrosSpadeELForTokenClassification"),f(re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(re,"href","#transformers.BrosSpadeELForTokenClassification"),f(Q,"class","relative group"),f(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(j,"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,t){n(document.head,i),c(e,M,t),c(e,p,t),c(e,h,t),c(e,v,t),n(v,a),n(a,w),b(be,w,null),n(v,$t),n(v,no),c(e,Vo,t),c(e,Z,t),n(Z,V),n(V,Jo),b(ye,Jo,null),n(Z,jt),n(Z,so),c(e,Oo,t),c(e,ke,t),c(e,Ho,t),c(e,Te,t),c(e,Xo,t),c(e,ve,t),c(e,Ao,t),c(e,Me,t),c(e,Do,t),c(e,we,t),c(e,Yo,t),c(e,xe,t),c(e,Ko,t),c(e,Ce,t),c(e,et,t),c(e,Be,t),c(e,ot,t),c(e,Ue,t),c(e,tt,t),c(e,$e,t),c(e,nt,t),c(e,je,t),c(e,st,t),b(Je,e,t),c(e,rt,t),c(e,Fe,t),c(e,at,t),b(ze,e,t),c(e,it,t),c(e,Ee,t),c(e,lt,t),c(e,Ne,t),c(e,dt,t),c(e,W,t),n(W,O),n(O,Fo),b(Se,Fo,null),n(W,Jt),n(W,ro),c(e,ct,t),c(e,C,t),b(Ie,C,null),n(C,Ft),n(C,ao),n(C,zt),n(C,io),n(C,Et),b(H,C,null),c(e,pt,t),c(e,q,t),n(q,X),n(X,zo),b(Ze,zo,null),n(q,Nt),n(q,lo),c(e,ht,t),c(e,B,t),b(We,B,null),n(B,St),n(B,co),n(B,It),n(B,po),n(B,Zt),n(B,I),b(qe,I,null),n(I,Wt),n(I,ho),n(I,qt),n(I,mo),c(e,mt,t),c(e,R,t),n(R,A),n(A,Eo),b(Re,Eo,null),n(R,Rt),n(R,fo),c(e,ft,t),c(e,N,t),b(Ge,N,null),n(N,Gt),n(N,uo),n(N,Lt),n(N,J),b(Le,J,null),n(J,Qt),n(J,go),n(J,Pt),b(D,J,null),n(J,Vt),b(Y,J,null),c(e,ut,t),c(e,G,t),n(G,K),n(K,No),b(Qe,No,null),n(G,Ot),n(G,_o),c(e,gt,t),c(e,U,t),b(Pe,U,null),n(U,Ht),n(U,bo),n(U,Xt),n(U,yo),n(U,At),n(U,F),b(Ve,F,null),n(F,Dt),n(F,ko),n(F,Yt),b(ee,F,null),n(F,Kt),b(oe,F,null),c(e,_t,t),c(e,L,t),n(L,te),n(te,So),b(Oe,So,null),n(L,en),n(L,To),c(e,bt,t),c(e,$,t),b(He,$,null),n($,on),n($,vo),n($,tn),n($,Mo),n($,nn),n($,z),b(Xe,z,null),n(z,sn),n(z,wo),n(z,rn),b(ne,z,null),n(z,an),b(se,z,null),c(e,yt,t),c(e,Q,t),n(Q,re),n(re,Io),b(Ae,Io,null),n(Q,ln),n(Q,xo),c(e,kt,t),c(e,j,t),b(De,j,null),n(j,dn),n(j,Co),n(j,cn),n(j,Bo),n(j,pn),n(j,E),b(Ye,E,null),n(E,hn),n(E,Uo),n(E,mn),b(ae,E,null),n(E,fn),b(ie,E,null),c(e,Tt,t),c(e,Zo,t),vt=!0},p(e,[t]){const Ke={};t&2&&(Ke.$$scope={dirty:t,ctx:e}),H.$set(Ke);const Wo={};t&2&&(Wo.$$scope={dirty:t,ctx:e}),D.$set(Wo);const qo={};t&2&&(qo.$$scope={dirty:t,ctx:e}),Y.$set(qo);const eo={};t&2&&(eo.$$scope={dirty:t,ctx:e}),ee.$set(eo);const Ro={};t&2&&(Ro.$$scope={dirty:t,ctx:e}),oe.$set(Ro);const Go={};t&2&&(Go.$$scope={dirty:t,ctx:e}),ne.$set(Go);const oo={};t&2&&(oo.$$scope={dirty:t,ctx:e}),se.$set(oo);const Lo={};t&2&&(Lo.$$scope={dirty:t,ctx:e}),ae.$set(Lo);const Qo={};t&2&&(Qo.$$scope={dirty:t,ctx:e}),ie.$set(Qo)},i(e){vt||(y(be.$$.fragment,e),y(ye.$$.fragment,e),y(Je.$$.fragment,e),y(ze.$$.fragment,e),y(Se.$$.fragment,e),y(Ie.$$.fragment,e),y(H.$$.fragment,e),y(Ze.$$.fragment,e),y(We.$$.fragment,e),y(qe.$$.fragment,e),y(Re.$$.fragment,e),y(Ge.$$.fragment,e),y(Le.$$.fragment,e),y(D.$$.fragment,e),y(Y.$$.fragment,e),y(Qe.$$.fragment,e),y(Pe.$$.fragment,e),y(Ve.$$.fragment,e),y(ee.$$.fragment,e),y(oe.$$.fragment,e),y(Oe.$$.fragment,e),y(He.$$.fragment,e),y(Xe.$$.fragment,e),y(ne.$$.fragment,e),y(se.$$.fragment,e),y(Ae.$$.fragment,e),y(De.$$.fragment,e),y(Ye.$$.fragment,e),y(ae.$$.fragment,e),y(ie.$$.fragment,e),vt=!0)},o(e){k(be.$$.fragment,e),k(ye.$$.fragment,e),k(Je.$$.fragment,e),k(ze.$$.fragment,e),k(Se.$$.fragment,e),k(Ie.$$.fragment,e),k(H.$$.fragment,e),k(Ze.$$.fragment,e),k(We.$$.fragment,e),k(qe.$$.fragment,e),k(Re.$$.fragment,e),k(Ge.$$.fragment,e),k(Le.$$.fragment,e),k(D.$$.fragment,e),k(Y.$$.fragment,e),k(Qe.$$.fragment,e),k(Pe.$$.fragment,e),k(Ve.$$.fragment,e),k(ee.$$.fragment,e),k(oe.$$.fragment,e),k(Oe.$$.fragment,e),k(He.$$.fragment,e),k(Xe.$$.fragment,e),k(ne.$$.fragment,e),k(se.$$.fragment,e),k(Ae.$$.fragment,e),k(De.$$.fragment,e),k(Ye.$$.fragment,e),k(ae.$$.fragment,e),k(ie.$$.fragment,e),vt=!1},d(e){e&&(o(M),o(p),o(h),o(v),o(Vo),o(Z),o(Oo),o(ke),o(Ho),o(Te),o(Xo),o(ve),o(Ao),o(Me),o(Do),o(we),o(Yo),o(xe),o(Ko),o(Ce),o(et),o(Be),o(ot),o(Ue),o(tt),o($e),o(nt),o(je),o(st),o(rt),o(Fe),o(at),o(it),o(Ee),o(lt),o(Ne),o(dt),o(W),o(ct),o(C),o(pt),o(q),o(ht),o(B),o(mt),o(R),o(ft),o(N),o(ut),o(G),o(gt),o(U),o(_t),o(L),o(bt),o($),o(yt),o(Q),o(kt),o(j),o(Tt),o(Zo)),o(i),T(be),T(ye),T(Je,e),T(ze,e),T(Se),T(Ie),T(H),T(Ze),T(We),T(qe),T(Re),T(Ge),T(Le),T(D),T(Y),T(Qe),T(Pe),T(Ve),T(ee),T(oe),T(Oe),T(He),T(Xe),T(ne),T(se),T(Ae),T(De),T(Ye),T(ae),T(ie)}}}const xs={local:"bros",sections:[{local:"overview",title:"Overview"},{local:"transformers.BrosConfig",title:"BrosConfig"},{local:"transformers.BrosProcessor",title:"BrosProcessor"},{local:"transformers.BrosModel",title:"BrosModel"},{local:"transformers.BrosForTokenClassification",title:"BrosForTokenClassification"},{local:"transformers.BrosSpadeEEForTokenClassification",title:"BrosSpadeEEForTokenClassification"},{local:"transformers.BrosSpadeELForTokenClassification",title:"BrosSpadeELForTokenClassification"}],title:"BROS"};function Cs(x){return ps(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Es extends hs{constructor(i){super(),ms(this,i,Cs,ws,cs,{})}}export{Es as component};
