import{s as Ht,o as Xt,n as H}from"../chunks/scheduler.25b97de1.js";import{S as Dt,i as Yt,g as c,s as a,r as h,A as At,h as p,f as t,c as r,j as U,u,x as f,k as j,y as d,a as i,v as g,d as _,t as b,w as y}from"../chunks/index.d9030fc9.js";import{T as Ro}from"../chunks/Tip.baa67368.js";import{D as L}from"../chunks/Docstring.e257edda.js";import{C as qe}from"../chunks/CodeBlock.e6cd0d95.js";import{E as ro}from"../chunks/ExampleCodeBlock.20db4b6e.js";import{H as V,E as Kt}from"../chunks/EditOnGithub.91d95064.js";function en(v){let n,T="Examples:",l,m,k;return m=new qe({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(){n=c("p"),n.textContent=T,l=a(),h(m.$$.fragment)},l(s){n=p(s,"P",{"data-svelte-h":!0}),f(n)!=="svelte-kvfsh7"&&(n.textContent=T),l=r(s),u(m.$$.fragment,s)},m(s,M){i(s,n,M),i(s,l,M),g(m,s,M),k=!0},p:H,i(s){k||(_(m.$$.fragment,s),k=!0)},o(s){b(m.$$.fragment,s),k=!1},d(s){s&&(t(n),t(l)),y(m,s)}}}function on(v){let n,T=`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(){n=c("p"),n.innerHTML=T},l(l){n=p(l,"P",{"data-svelte-h":!0}),f(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(l,m){i(l,n,m)},p:H,d(l){l&&t(n)}}}function tn(v){let n,T="Examples:",l,m,k;return m=new qe({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(){n=c("p"),n.textContent=T,l=a(),h(m.$$.fragment)},l(s){n=p(s,"P",{"data-svelte-h":!0}),f(n)!=="svelte-kvfsh7"&&(n.textContent=T),l=r(s),u(m.$$.fragment,s)},m(s,M){i(s,n,M),i(s,l,M),g(m,s,M),k=!0},p:H,i(s){k||(_(m.$$.fragment,s),k=!0)},o(s){b(m.$$.fragment,s),k=!1},d(s){s&&(t(n),t(l)),y(m,s)}}}function nn(v){let n,T=`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(){n=c("p"),n.innerHTML=T},l(l){n=p(l,"P",{"data-svelte-h":!0}),f(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(l,m){i(l,n,m)},p:H,d(l){l&&t(n)}}}function sn(v){let n,T="Examples:",l,m,k;return m=new qe({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(){n=c("p"),n.textContent=T,l=a(),h(m.$$.fragment)},l(s){n=p(s,"P",{"data-svelte-h":!0}),f(n)!=="svelte-kvfsh7"&&(n.textContent=T),l=r(s),u(m.$$.fragment,s)},m(s,M){i(s,n,M),i(s,l,M),g(m,s,M),k=!0},p:H,i(s){k||(_(m.$$.fragment,s),k=!0)},o(s){b(m.$$.fragment,s),k=!1},d(s){s&&(t(n),t(l)),y(m,s)}}}function an(v){let n,T=`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(){n=c("p"),n.innerHTML=T},l(l){n=p(l,"P",{"data-svelte-h":!0}),f(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(l,m){i(l,n,m)},p:H,d(l){l&&t(n)}}}function rn(v){let n,T="Examples:",l,m,k;return m=new qe({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(){n=c("p"),n.textContent=T,l=a(),h(m.$$.fragment)},l(s){n=p(s,"P",{"data-svelte-h":!0}),f(n)!=="svelte-kvfsh7"&&(n.textContent=T),l=r(s),u(m.$$.fragment,s)},m(s,M){i(s,n,M),i(s,l,M),g(m,s,M),k=!0},p:H,i(s){k||(_(m.$$.fragment,s),k=!0)},o(s){b(m.$$.fragment,s),k=!1},d(s){s&&(t(n),t(l)),y(m,s)}}}function ln(v){let n,T=`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(){n=c("p"),n.innerHTML=T},l(l){n=p(l,"P",{"data-svelte-h":!0}),f(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(l,m){i(l,n,m)},p:H,d(l){l&&t(n)}}}function dn(v){let n,T="Examples:",l,m,k;return m=new qe({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(){n=c("p"),n.textContent=T,l=a(),h(m.$$.fragment)},l(s){n=p(s,"P",{"data-svelte-h":!0}),f(n)!=="svelte-kvfsh7"&&(n.textContent=T),l=r(s),u(m.$$.fragment,s)},m(s,M){i(s,n,M),i(s,l,M),g(m,s,M),k=!0},p:H,i(s){k||(_(m.$$.fragment,s),k=!0)},o(s){b(m.$$.fragment,s),k=!1},d(s){s&&(t(n),t(l)),y(m,s)}}}function cn(v){let n,T,l,m,k,s,M,io,re,bt='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.',lo,ie,yt="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.",co,le,kt=`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).`,po,de,Tt=`<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.`,mo,ce,Mt="<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.",fo,pe,vt="<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.",ho,me,wt="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.",uo,fe,xt="The abstract from the paper is the following:",go,he,Ct="<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.*",_o,ue,$t='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>.',bo,ge,yo,_e,Bt='<li><a href="/docs/transformers/v4.43.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>',ko,be,To,ye,Ut="<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>",Mo,ke,vo,Te,wo,Me,jt='<li>Demo scripts can be found <a href="https://github.com/clovaai/bros" rel="nofollow">here</a>.</li>',xo,ve,Co,w,we,qo,Ge,Jt=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.43.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.`,Go,Le,Ft=`Configuration objects inherit from <a href="/docs/transformers/v4.43.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.43.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Lo,X,$o,xe,Bo,x,Ce,Qo,Qe,zt="Constructs a Bros processor which wraps a BERT tokenizer.",Vo,Ve,Nt=`<a href="/docs/transformers/v4.43.0/en/model_doc/bros#transformers.BrosProcessor">BrosProcessor</a> offers all the functionalities of <a href="/docs/transformers/v4.43.0/en/model_doc/bert#transformers.BertTokenizerFast">BertTokenizerFast</a>. See the docstring of
<a href="/docs/transformers/v4.43.0/en/model_doc/bros#transformers.BrosProcessor.__call__"><strong>call</strong>()</a> and <code>decode()</code> for more information.`,Po,Q,$e,Oo,Pe,Et='This method uses <a href="/docs/transformers/v4.43.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">BertTokenizerFast.<strong>call</strong>()</a> to prepare text for the model.',Ho,Oe,It="Please refer to the docstring of the above two methods for more information.",Uo,Be,jo,E,Ue,Xo,He,St=`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.`,Do,J,je,Yo,Xe,Zt='The <a href="/docs/transformers/v4.43.0/en/model_doc/bros#transformers.BrosModel">BrosModel</a> forward method, overrides the <code>__call__</code> special method.',Ao,D,Ko,Y,Jo,Je,Fo,C,Fe,et,De,Wt=`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.`,ot,Ye,Rt=`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.`,tt,F,ze,nt,Ae,qt='The <a href="/docs/transformers/v4.43.0/en/model_doc/bros#transformers.BrosForTokenClassification">BrosForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',st,A,at,K,zo,Ne,No,$,Ee,rt,Ke,Gt=`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.`,it,eo,Lt=`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,z,Ie,dt,oo,Qt='The <a href="/docs/transformers/v4.43.0/en/model_doc/bros#transformers.BrosSpadeEEForTokenClassification">BrosSpadeEEForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',ct,ee,pt,oe,Eo,Se,Io,B,Ze,mt,to,Vt=`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).`,ft,no,Pt=`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.`,ht,N,We,ut,so,Ot='The <a href="/docs/transformers/v4.43.0/en/model_doc/bros#transformers.BrosSpadeELForTokenClassification">BrosSpadeELForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',gt,te,_t,ne,So,Re,Zo,ao,Wo;return k=new V({props:{title:"BROS",local:"bros",headingTag:"h1"}}),M=new V({props:{title:"Overview",local:"overview",headingTag:"h2"}}),ge=new V({props:{title:"Usage tips and examples",local:"usage-tips-and-examples",headingTag:"h2"}}),be=new qe({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}}),ke=new qe({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}}),Te=new V({props:{title:"Resources",local:"resources",headingTag:"h2"}}),ve=new V({props:{title:"BrosConfig",local:"transformers.BrosConfig",headingTag:"h2"}}),we=new L({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.43.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.43.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.43.0/src/transformers/models/bros/configuration_bros.py#L24"}}),X=new ro({props:{anchor:"transformers.BrosConfig.example",$$slots:{default:[en]},$$scope:{ctx:v}}}),xe=new V({props:{title:"BrosProcessor",local:"transformers.BrosProcessor",headingTag:"h2"}}),Ce=new L({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>, <em>optional</em>) &#x2014;\nAn instance of [&#x2018;BertTokenizerFast`]. The tokenizer is a required input.",name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/v4.43.0/src/transformers/models/bros/processing_bros.py#L26"}}),$e=new L({props:{name:"__call__",anchor:"transformers.BrosProcessor.__call__",parameters:[{name:"text",val:": Union = None"},{name:"add_special_tokens",val:": bool = True"},{name:"padding",val:": Union = False"},{name:"truncation",val:": Union = None"},{name:"max_length",val:": Optional = None"},{name:"stride",val:": int = 0"},{name:"pad_to_multiple_of",val:": Optional = None"},{name:"return_token_type_ids",val:": Optional = None"},{name:"return_attention_mask",val:": Optional = 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:": Union = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.43.0/src/transformers/models/bros/processing_bros.py#L47"}}),Be=new V({props:{title:"BrosModel",local:"transformers.BrosModel",headingTag:"h2"}}),Ue=new L({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.43.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.43.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.43.0/src/transformers/models/bros/modeling_bros.py#L778"}}),je=new L({props:{name:"forward",anchor:"transformers.BrosModel.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"bbox",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"encoder_hidden_states",val:": Optional = None"},{name:"encoder_attention_mask",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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.43.0/en/model_doc/bros#transformers.BrosProcessor">BrosProcessor</a>. See <a href="/docs/transformers/v4.43.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.43.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.43.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.43.0/src/transformers/models/bros/modeling_bros.py#L809",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.43.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.43.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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/v4.43.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),D=new Ro({props:{$$slots:{default:[on]},$$scope:{ctx:v}}}),Y=new ro({props:{anchor:"transformers.BrosModel.forward.example",$$slots:{default:[tn]},$$scope:{ctx:v}}}),Je=new V({props:{title:"BrosForTokenClassification",local:"transformers.BrosForTokenClassification",headingTag:"h2"}}),Fe=new L({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.43.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.43.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.43.0/src/transformers/models/bros/modeling_bros.py#L953"}}),ze=new L({props:{name:"forward",anchor:"transformers.BrosForTokenClassification.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"bbox",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"bbox_first_token_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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.43.0/en/model_doc/bros#transformers.BrosProcessor">BrosProcessor</a>. See <a href="/docs/transformers/v4.43.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.43.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.43.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.43.0/src/transformers/models/bros/modeling_bros.py#L976",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.43.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.43.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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/v4.43.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),A=new Ro({props:{$$slots:{default:[nn]},$$scope:{ctx:v}}}),K=new ro({props:{anchor:"transformers.BrosForTokenClassification.forward.example",$$slots:{default:[sn]},$$scope:{ctx:v}}}),Ne=new V({props:{title:"BrosSpadeEEForTokenClassification",local:"transformers.BrosSpadeEEForTokenClassification",headingTag:"h2"}}),Ee=new L({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.43.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.43.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.43.0/src/transformers/models/bros/modeling_bros.py#L1057"}}),Ie=new L({props:{name:"forward",anchor:"transformers.BrosSpadeEEForTokenClassification.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"bbox",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"bbox_first_token_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"initial_token_labels",val:": Optional = None"},{name:"subsequent_token_labels",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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.43.0/en/model_doc/bros#transformers.BrosProcessor">BrosProcessor</a>. See <a href="/docs/transformers/v4.43.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.43.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.43.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.43.0/src/transformers/models/bros/modeling_bros.py#L1095",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<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.43.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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.bros.modeling_bros.BrosSpadeOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ee=new Ro({props:{$$slots:{default:[an]},$$scope:{ctx:v}}}),oe=new ro({props:{anchor:"transformers.BrosSpadeEEForTokenClassification.forward.example",$$slots:{default:[rn]},$$scope:{ctx:v}}}),Se=new V({props:{title:"BrosSpadeELForTokenClassification",local:"transformers.BrosSpadeELForTokenClassification",headingTag:"h2"}}),Ze=new L({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.43.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.43.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.43.0/src/transformers/models/bros/modeling_bros.py#L1203"}}),We=new L({props:{name:"forward",anchor:"transformers.BrosSpadeELForTokenClassification.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"bbox",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"bbox_first_token_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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.43.0/en/model_doc/bros#transformers.BrosProcessor">BrosProcessor</a>. See <a href="/docs/transformers/v4.43.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.43.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.43.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.43.0/src/transformers/models/bros/modeling_bros.py#L1227",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.43.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.43.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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/v4.43.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),te=new Ro({props:{$$slots:{default:[ln]},$$scope:{ctx:v}}}),ne=new ro({props:{anchor:"transformers.BrosSpadeELForTokenClassification.forward.example",$$slots:{default:[dn]},$$scope:{ctx:v}}}),Re=new Kt({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/bros.md"}}),{c(){n=c("meta"),T=a(),l=c("p"),m=a(),h(k.$$.fragment),s=a(),h(M.$$.fragment),io=a(),re=c("p"),re.innerHTML=bt,lo=a(),ie=c("p"),ie.innerHTML=yt,co=a(),le=c("p"),le.textContent=kt,po=a(),de=c("p"),de.innerHTML=Tt,mo=a(),ce=c("p"),ce.innerHTML=Mt,fo=a(),pe=c("p"),pe.innerHTML=vt,ho=a(),me=c("p"),me.textContent=wt,uo=a(),fe=c("p"),fe.textContent=xt,go=a(),he=c("p"),he.innerHTML=Ct,_o=a(),ue=c("p"),ue.innerHTML=$t,bo=a(),h(ge.$$.fragment),yo=a(),_e=c("ul"),_e.innerHTML=Bt,ko=a(),h(be.$$.fragment),To=a(),ye=c("ul"),ye.innerHTML=Ut,Mo=a(),h(ke.$$.fragment),vo=a(),h(Te.$$.fragment),wo=a(),Me=c("ul"),Me.innerHTML=jt,xo=a(),h(ve.$$.fragment),Co=a(),w=c("div"),h(we.$$.fragment),qo=a(),Ge=c("p"),Ge.innerHTML=Jt,Go=a(),Le=c("p"),Le.innerHTML=Ft,Lo=a(),h(X.$$.fragment),$o=a(),h(xe.$$.fragment),Bo=a(),x=c("div"),h(Ce.$$.fragment),Qo=a(),Qe=c("p"),Qe.textContent=zt,Vo=a(),Ve=c("p"),Ve.innerHTML=Nt,Po=a(),Q=c("div"),h($e.$$.fragment),Oo=a(),Pe=c("p"),Pe.innerHTML=Et,Ho=a(),Oe=c("p"),Oe.textContent=It,Uo=a(),h(Be.$$.fragment),jo=a(),E=c("div"),h(Ue.$$.fragment),Xo=a(),He=c("p"),He.innerHTML=St,Do=a(),J=c("div"),h(je.$$.fragment),Yo=a(),Xe=c("p"),Xe.innerHTML=Zt,Ao=a(),h(D.$$.fragment),Ko=a(),h(Y.$$.fragment),Jo=a(),h(Je.$$.fragment),Fo=a(),C=c("div"),h(Fe.$$.fragment),et=a(),De=c("p"),De.textContent=Wt,ot=a(),Ye=c("p"),Ye.innerHTML=Rt,tt=a(),F=c("div"),h(ze.$$.fragment),nt=a(),Ae=c("p"),Ae.innerHTML=qt,st=a(),h(A.$$.fragment),at=a(),h(K.$$.fragment),zo=a(),h(Ne.$$.fragment),No=a(),$=c("div"),h(Ee.$$.fragment),rt=a(),Ke=c("p"),Ke.textContent=Gt,it=a(),eo=c("p"),eo.innerHTML=Lt,lt=a(),z=c("div"),h(Ie.$$.fragment),dt=a(),oo=c("p"),oo.innerHTML=Qt,ct=a(),h(ee.$$.fragment),pt=a(),h(oe.$$.fragment),Eo=a(),h(Se.$$.fragment),Io=a(),B=c("div"),h(Ze.$$.fragment),mt=a(),to=c("p"),to.textContent=Vt,ft=a(),no=c("p"),no.innerHTML=Pt,ht=a(),N=c("div"),h(We.$$.fragment),ut=a(),so=c("p"),so.innerHTML=Ot,gt=a(),h(te.$$.fragment),_t=a(),h(ne.$$.fragment),So=a(),h(Re.$$.fragment),Zo=a(),ao=c("p"),this.h()},l(e){const o=At("svelte-u9bgzb",document.head);n=p(o,"META",{name:!0,content:!0}),o.forEach(t),T=r(e),l=p(e,"P",{}),U(l).forEach(t),m=r(e),u(k.$$.fragment,e),s=r(e),u(M.$$.fragment,e),io=r(e),re=p(e,"P",{"data-svelte-h":!0}),f(re)!=="svelte-wn68vq"&&(re.innerHTML=bt),lo=r(e),ie=p(e,"P",{"data-svelte-h":!0}),f(ie)!=="svelte-x3aljh"&&(ie.innerHTML=yt),co=r(e),le=p(e,"P",{"data-svelte-h":!0}),f(le)!=="svelte-a4zidq"&&(le.textContent=kt),po=r(e),de=p(e,"P",{"data-svelte-h":!0}),f(de)!=="svelte-gnae6o"&&(de.innerHTML=Tt),mo=r(e),ce=p(e,"P",{"data-svelte-h":!0}),f(ce)!=="svelte-1cpns1a"&&(ce.innerHTML=Mt),fo=r(e),pe=p(e,"P",{"data-svelte-h":!0}),f(pe)!=="svelte-1mj28ly"&&(pe.innerHTML=vt),ho=r(e),me=p(e,"P",{"data-svelte-h":!0}),f(me)!=="svelte-fp1b99"&&(me.textContent=wt),uo=r(e),fe=p(e,"P",{"data-svelte-h":!0}),f(fe)!=="svelte-vfdo9a"&&(fe.textContent=xt),go=r(e),he=p(e,"P",{"data-svelte-h":!0}),f(he)!=="svelte-1citvm0"&&(he.innerHTML=Ct),_o=r(e),ue=p(e,"P",{"data-svelte-h":!0}),f(ue)!=="svelte-1ys7xl0"&&(ue.innerHTML=$t),bo=r(e),u(ge.$$.fragment,e),yo=r(e),_e=p(e,"UL",{"data-svelte-h":!0}),f(_e)!=="svelte-13wd082"&&(_e.innerHTML=Bt),ko=r(e),u(be.$$.fragment,e),To=r(e),ye=p(e,"UL",{"data-svelte-h":!0}),f(ye)!=="svelte-88mplb"&&(ye.innerHTML=Ut),Mo=r(e),u(ke.$$.fragment,e),vo=r(e),u(Te.$$.fragment,e),wo=r(e),Me=p(e,"UL",{"data-svelte-h":!0}),f(Me)!=="svelte-17diifa"&&(Me.innerHTML=jt),xo=r(e),u(ve.$$.fragment,e),Co=r(e),w=p(e,"DIV",{class:!0});var I=U(w);u(we.$$.fragment,I),qo=r(I),Ge=p(I,"P",{"data-svelte-h":!0}),f(Ge)!=="svelte-1ecovi5"&&(Ge.innerHTML=Jt),Go=r(I),Le=p(I,"P",{"data-svelte-h":!0}),f(Le)!=="svelte-w5ddnh"&&(Le.innerHTML=Ft),Lo=r(I),u(X.$$.fragment,I),I.forEach(t),$o=r(e),u(xe.$$.fragment,e),Bo=r(e),x=p(e,"DIV",{class:!0});var S=U(x);u(Ce.$$.fragment,S),Qo=r(S),Qe=p(S,"P",{"data-svelte-h":!0}),f(Qe)!=="svelte-14kb9li"&&(Qe.textContent=zt),Vo=r(S),Ve=p(S,"P",{"data-svelte-h":!0}),f(Ve)!=="svelte-1i9w1e8"&&(Ve.innerHTML=Nt),Po=r(S),Q=p(S,"DIV",{class:!0});var P=U(Q);u($e.$$.fragment,P),Oo=r(P),Pe=p(P,"P",{"data-svelte-h":!0}),f(Pe)!=="svelte-r90a1y"&&(Pe.innerHTML=Et),Ho=r(P),Oe=p(P,"P",{"data-svelte-h":!0}),f(Oe)!=="svelte-ws0hzs"&&(Oe.textContent=It),P.forEach(t),S.forEach(t),Uo=r(e),u(Be.$$.fragment,e),jo=r(e),E=p(e,"DIV",{class:!0});var O=U(E);u(Ue.$$.fragment,O),Xo=r(O),He=p(O,"P",{"data-svelte-h":!0}),f(He)!=="svelte-5kas2u"&&(He.innerHTML=St),Do=r(O),J=p(O,"DIV",{class:!0});var Z=U(J);u(je.$$.fragment,Z),Yo=r(Z),Xe=p(Z,"P",{"data-svelte-h":!0}),f(Xe)!=="svelte-1kcjf2h"&&(Xe.innerHTML=Zt),Ao=r(Z),u(D.$$.fragment,Z),Ko=r(Z),u(Y.$$.fragment,Z),Z.forEach(t),O.forEach(t),Jo=r(e),u(Je.$$.fragment,e),Fo=r(e),C=p(e,"DIV",{class:!0});var W=U(C);u(Fe.$$.fragment,W),et=r(W),De=p(W,"P",{"data-svelte-h":!0}),f(De)!=="svelte-mf69l7"&&(De.textContent=Wt),ot=r(W),Ye=p(W,"P",{"data-svelte-h":!0}),f(Ye)!=="svelte-hswkmf"&&(Ye.innerHTML=Rt),tt=r(W),F=p(W,"DIV",{class:!0});var R=U(F);u(ze.$$.fragment,R),nt=r(R),Ae=p(R,"P",{"data-svelte-h":!0}),f(Ae)!=="svelte-ryti9p"&&(Ae.innerHTML=qt),st=r(R),u(A.$$.fragment,R),at=r(R),u(K.$$.fragment,R),R.forEach(t),W.forEach(t),zo=r(e),u(Ne.$$.fragment,e),No=r(e),$=p(e,"DIV",{class:!0});var q=U($);u(Ee.$$.fragment,q),rt=r(q),Ke=p(q,"P",{"data-svelte-h":!0}),f(Ke)!=="svelte-5z2g1e"&&(Ke.textContent=Gt),it=r(q),eo=p(q,"P",{"data-svelte-h":!0}),f(eo)!=="svelte-hswkmf"&&(eo.innerHTML=Lt),lt=r(q),z=p(q,"DIV",{class:!0});var G=U(z);u(Ie.$$.fragment,G),dt=r(G),oo=p(G,"P",{"data-svelte-h":!0}),f(oo)!=="svelte-kjh6q9"&&(oo.innerHTML=Qt),ct=r(G),u(ee.$$.fragment,G),pt=r(G),u(oe.$$.fragment,G),G.forEach(t),q.forEach(t),Eo=r(e),u(Se.$$.fragment,e),Io=r(e),B=p(e,"DIV",{class:!0});var se=U(B);u(Ze.$$.fragment,se),mt=r(se),to=p(se,"P",{"data-svelte-h":!0}),f(to)!=="svelte-oir21p"&&(to.textContent=Vt),ft=r(se),no=p(se,"P",{"data-svelte-h":!0}),f(no)!=="svelte-hswkmf"&&(no.innerHTML=Pt),ht=r(se),N=p(se,"DIV",{class:!0});var ae=U(N);u(We.$$.fragment,ae),ut=r(ae),so=p(ae,"P",{"data-svelte-h":!0}),f(so)!=="svelte-1ylj9vh"&&(so.innerHTML=Ot),gt=r(ae),u(te.$$.fragment,ae),_t=r(ae),u(ne.$$.fragment,ae),ae.forEach(t),se.forEach(t),So=r(e),u(Re.$$.fragment,e),Zo=r(e),ao=p(e,"P",{}),U(ao).forEach(t),this.h()},h(){j(n,"name","hf:doc:metadata"),j(n,"content",pn),j(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(B,"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,o){d(document.head,n),i(e,T,o),i(e,l,o),i(e,m,o),g(k,e,o),i(e,s,o),g(M,e,o),i(e,io,o),i(e,re,o),i(e,lo,o),i(e,ie,o),i(e,co,o),i(e,le,o),i(e,po,o),i(e,de,o),i(e,mo,o),i(e,ce,o),i(e,fo,o),i(e,pe,o),i(e,ho,o),i(e,me,o),i(e,uo,o),i(e,fe,o),i(e,go,o),i(e,he,o),i(e,_o,o),i(e,ue,o),i(e,bo,o),g(ge,e,o),i(e,yo,o),i(e,_e,o),i(e,ko,o),g(be,e,o),i(e,To,o),i(e,ye,o),i(e,Mo,o),g(ke,e,o),i(e,vo,o),g(Te,e,o),i(e,wo,o),i(e,Me,o),i(e,xo,o),g(ve,e,o),i(e,Co,o),i(e,w,o),g(we,w,null),d(w,qo),d(w,Ge),d(w,Go),d(w,Le),d(w,Lo),g(X,w,null),i(e,$o,o),g(xe,e,o),i(e,Bo,o),i(e,x,o),g(Ce,x,null),d(x,Qo),d(x,Qe),d(x,Vo),d(x,Ve),d(x,Po),d(x,Q),g($e,Q,null),d(Q,Oo),d(Q,Pe),d(Q,Ho),d(Q,Oe),i(e,Uo,o),g(Be,e,o),i(e,jo,o),i(e,E,o),g(Ue,E,null),d(E,Xo),d(E,He),d(E,Do),d(E,J),g(je,J,null),d(J,Yo),d(J,Xe),d(J,Ao),g(D,J,null),d(J,Ko),g(Y,J,null),i(e,Jo,o),g(Je,e,o),i(e,Fo,o),i(e,C,o),g(Fe,C,null),d(C,et),d(C,De),d(C,ot),d(C,Ye),d(C,tt),d(C,F),g(ze,F,null),d(F,nt),d(F,Ae),d(F,st),g(A,F,null),d(F,at),g(K,F,null),i(e,zo,o),g(Ne,e,o),i(e,No,o),i(e,$,o),g(Ee,$,null),d($,rt),d($,Ke),d($,it),d($,eo),d($,lt),d($,z),g(Ie,z,null),d(z,dt),d(z,oo),d(z,ct),g(ee,z,null),d(z,pt),g(oe,z,null),i(e,Eo,o),g(Se,e,o),i(e,Io,o),i(e,B,o),g(Ze,B,null),d(B,mt),d(B,to),d(B,ft),d(B,no),d(B,ht),d(B,N),g(We,N,null),d(N,ut),d(N,so),d(N,gt),g(te,N,null),d(N,_t),g(ne,N,null),i(e,So,o),g(Re,e,o),i(e,Zo,o),i(e,ao,o),Wo=!0},p(e,[o]){const I={};o&2&&(I.$$scope={dirty:o,ctx:e}),X.$set(I);const S={};o&2&&(S.$$scope={dirty:o,ctx:e}),D.$set(S);const P={};o&2&&(P.$$scope={dirty:o,ctx:e}),Y.$set(P);const O={};o&2&&(O.$$scope={dirty:o,ctx:e}),A.$set(O);const Z={};o&2&&(Z.$$scope={dirty:o,ctx:e}),K.$set(Z);const W={};o&2&&(W.$$scope={dirty:o,ctx:e}),ee.$set(W);const R={};o&2&&(R.$$scope={dirty:o,ctx:e}),oe.$set(R);const q={};o&2&&(q.$$scope={dirty:o,ctx:e}),te.$set(q);const G={};o&2&&(G.$$scope={dirty:o,ctx:e}),ne.$set(G)},i(e){Wo||(_(k.$$.fragment,e),_(M.$$.fragment,e),_(ge.$$.fragment,e),_(be.$$.fragment,e),_(ke.$$.fragment,e),_(Te.$$.fragment,e),_(ve.$$.fragment,e),_(we.$$.fragment,e),_(X.$$.fragment,e),_(xe.$$.fragment,e),_(Ce.$$.fragment,e),_($e.$$.fragment,e),_(Be.$$.fragment,e),_(Ue.$$.fragment,e),_(je.$$.fragment,e),_(D.$$.fragment,e),_(Y.$$.fragment,e),_(Je.$$.fragment,e),_(Fe.$$.fragment,e),_(ze.$$.fragment,e),_(A.$$.fragment,e),_(K.$$.fragment,e),_(Ne.$$.fragment,e),_(Ee.$$.fragment,e),_(Ie.$$.fragment,e),_(ee.$$.fragment,e),_(oe.$$.fragment,e),_(Se.$$.fragment,e),_(Ze.$$.fragment,e),_(We.$$.fragment,e),_(te.$$.fragment,e),_(ne.$$.fragment,e),_(Re.$$.fragment,e),Wo=!0)},o(e){b(k.$$.fragment,e),b(M.$$.fragment,e),b(ge.$$.fragment,e),b(be.$$.fragment,e),b(ke.$$.fragment,e),b(Te.$$.fragment,e),b(ve.$$.fragment,e),b(we.$$.fragment,e),b(X.$$.fragment,e),b(xe.$$.fragment,e),b(Ce.$$.fragment,e),b($e.$$.fragment,e),b(Be.$$.fragment,e),b(Ue.$$.fragment,e),b(je.$$.fragment,e),b(D.$$.fragment,e),b(Y.$$.fragment,e),b(Je.$$.fragment,e),b(Fe.$$.fragment,e),b(ze.$$.fragment,e),b(A.$$.fragment,e),b(K.$$.fragment,e),b(Ne.$$.fragment,e),b(Ee.$$.fragment,e),b(Ie.$$.fragment,e),b(ee.$$.fragment,e),b(oe.$$.fragment,e),b(Se.$$.fragment,e),b(Ze.$$.fragment,e),b(We.$$.fragment,e),b(te.$$.fragment,e),b(ne.$$.fragment,e),b(Re.$$.fragment,e),Wo=!1},d(e){e&&(t(T),t(l),t(m),t(s),t(io),t(re),t(lo),t(ie),t(co),t(le),t(po),t(de),t(mo),t(ce),t(fo),t(pe),t(ho),t(me),t(uo),t(fe),t(go),t(he),t(_o),t(ue),t(bo),t(yo),t(_e),t(ko),t(To),t(ye),t(Mo),t(vo),t(wo),t(Me),t(xo),t(Co),t(w),t($o),t(Bo),t(x),t(Uo),t(jo),t(E),t(Jo),t(Fo),t(C),t(zo),t(No),t($),t(Eo),t(Io),t(B),t(So),t(Zo),t(ao)),t(n),y(k,e),y(M,e),y(ge,e),y(be,e),y(ke,e),y(Te,e),y(ve,e),y(we),y(X),y(xe,e),y(Ce),y($e),y(Be,e),y(Ue),y(je),y(D),y(Y),y(Je,e),y(Fe),y(ze),y(A),y(K),y(Ne,e),y(Ee),y(Ie),y(ee),y(oe),y(Se,e),y(Ze),y(We),y(te),y(ne),y(Re,e)}}}const pn='{"title":"BROS","local":"bros","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips and examples","local":"usage-tips-and-examples","sections":[],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"BrosConfig","local":"transformers.BrosConfig","sections":[],"depth":2},{"title":"BrosProcessor","local":"transformers.BrosProcessor","sections":[],"depth":2},{"title":"BrosModel","local":"transformers.BrosModel","sections":[],"depth":2},{"title":"BrosForTokenClassification","local":"transformers.BrosForTokenClassification","sections":[],"depth":2},{"title":"BrosSpadeEEForTokenClassification","local":"transformers.BrosSpadeEEForTokenClassification","sections":[],"depth":2},{"title":"BrosSpadeELForTokenClassification","local":"transformers.BrosSpadeELForTokenClassification","sections":[],"depth":2}],"depth":1}';function mn(v){return Xt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class kn extends Dt{constructor(n){super(),Yt(this,n,mn,cn,Ht,{})}}export{kn as component};
