import{s as At,o as Kt,n as O}from"../chunks/scheduler.25b97de1.js";import{S as en,i as on,g as l,s as r,r as f,A as tn,h as d,f as t,c as i,j as $,u,x as h,k as j,y as p,a,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 Re}from"../chunks/CodeBlock.e6cd0d95.js";import{E as ro}from"../chunks/ExampleCodeBlock.20db4b6e.js";import{H as so,E as nn}from"../chunks/EditOnGithub.91d95064.js";function sn(w){let n,M="Examples:",c,m,k;return m=new Re({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=l("p"),n.textContent=M,c=r(),f(m.$$.fragment)},l(s){n=d(s,"P",{"data-svelte-h":!0}),h(n)!=="svelte-kvfsh7"&&(n.textContent=M),c=i(s),u(m.$$.fragment,s)},m(s,T){a(s,n,T),a(s,c,T),g(m,s,T),k=!0},p:O,i(s){k||(_(m.$$.fragment,s),k=!0)},o(s){b(m.$$.fragment,s),k=!1},d(s){s&&(t(n),t(c)),y(m,s)}}}function an(w){let n,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(){n=l("p"),n.innerHTML=M},l(c){n=d(c,"P",{"data-svelte-h":!0}),h(n)!=="svelte-fincs2"&&(n.innerHTML=M)},m(c,m){a(c,n,m)},p:O,d(c){c&&t(n)}}}function rn(w){let n,M="Examples:",c,m,k;return m=new Re({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=l("p"),n.textContent=M,c=r(),f(m.$$.fragment)},l(s){n=d(s,"P",{"data-svelte-h":!0}),h(n)!=="svelte-kvfsh7"&&(n.textContent=M),c=i(s),u(m.$$.fragment,s)},m(s,T){a(s,n,T),a(s,c,T),g(m,s,T),k=!0},p:O,i(s){k||(_(m.$$.fragment,s),k=!0)},o(s){b(m.$$.fragment,s),k=!1},d(s){s&&(t(n),t(c)),y(m,s)}}}function ln(w){let n,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(){n=l("p"),n.innerHTML=M},l(c){n=d(c,"P",{"data-svelte-h":!0}),h(n)!=="svelte-fincs2"&&(n.innerHTML=M)},m(c,m){a(c,n,m)},p:O,d(c){c&&t(n)}}}function dn(w){let n,M="Examples:",c,m,k;return m=new Re({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=l("p"),n.textContent=M,c=r(),f(m.$$.fragment)},l(s){n=d(s,"P",{"data-svelte-h":!0}),h(n)!=="svelte-kvfsh7"&&(n.textContent=M),c=i(s),u(m.$$.fragment,s)},m(s,T){a(s,n,T),a(s,c,T),g(m,s,T),k=!0},p:O,i(s){k||(_(m.$$.fragment,s),k=!0)},o(s){b(m.$$.fragment,s),k=!1},d(s){s&&(t(n),t(c)),y(m,s)}}}function cn(w){let n,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(){n=l("p"),n.innerHTML=M},l(c){n=d(c,"P",{"data-svelte-h":!0}),h(n)!=="svelte-fincs2"&&(n.innerHTML=M)},m(c,m){a(c,n,m)},p:O,d(c){c&&t(n)}}}function pn(w){let n,M="Examples:",c,m,k;return m=new Re({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=l("p"),n.textContent=M,c=r(),f(m.$$.fragment)},l(s){n=d(s,"P",{"data-svelte-h":!0}),h(n)!=="svelte-kvfsh7"&&(n.textContent=M),c=i(s),u(m.$$.fragment,s)},m(s,T){a(s,n,T),a(s,c,T),g(m,s,T),k=!0},p:O,i(s){k||(_(m.$$.fragment,s),k=!0)},o(s){b(m.$$.fragment,s),k=!1},d(s){s&&(t(n),t(c)),y(m,s)}}}function mn(w){let n,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(){n=l("p"),n.innerHTML=M},l(c){n=d(c,"P",{"data-svelte-h":!0}),h(n)!=="svelte-fincs2"&&(n.innerHTML=M)},m(c,m){a(c,n,m)},p:O,d(c){c&&t(n)}}}function hn(w){let n,M="Examples:",c,m,k;return m=new Re({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=l("p"),n.textContent=M,c=r(),f(m.$$.fragment)},l(s){n=d(s,"P",{"data-svelte-h":!0}),h(n)!=="svelte-kvfsh7"&&(n.textContent=M),c=i(s),u(m.$$.fragment,s)},m(s,T){a(s,n,T),a(s,c,T),g(m,s,T),k=!0},p:O,i(s){k||(_(m.$$.fragment,s),k=!0)},o(s){b(m.$$.fragment,s),k=!1},d(s){s&&(t(n),t(c)),y(m,s)}}}function fn(w){let n,M,c,m,k,s,T,io,ae,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,re,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,ie,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,le,Mt=`<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,de,Tt="<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.",ho,ce,wt="<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.",fo,pe,xt="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,me,vt="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,fe,Bt='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,ue,yo,ge,Ut='<li><a href="/docs/transformers/main/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,_e,Mo,be,$t="<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>",To,ye,wo,ke,xo,Me,jt='<li>Demo scripts can be found <a href="https://github.com/clovaai/bros" rel="nofollow">here</a>.</li>',vo,Te,Co,x,we,qo,qe,Jt=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/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,Ge,Ft=`Configuration objects inherit from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Lo,H,Bo,xe,Uo,v,ve,Qo,Le,zt="Constructs a Bros processor which wraps a BERT tokenizer.",Vo,Qe,Nt=`<a href="/docs/transformers/main/en/model_doc/bros#transformers.BrosProcessor">BrosProcessor</a> offers all the functionalities of <a href="/docs/transformers/main/en/model_doc/bert#transformers.BertTokenizerFast">BertTokenizerFast</a>. See the docstring of
<a href="/docs/transformers/main/en/model_doc/bros#transformers.BrosProcessor.__call__"><strong>call</strong>()</a> and <code>decode()</code> for more information.`,Po,Q,Ce,Oo,Ve,Et='This method uses <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">BertTokenizerFast.<strong>call</strong>()</a> to prepare text for the model.',Ho,Pe,It="Please refer to the docstring of the above two methods for more information.",$o,Be,St="## BrosModel[[transformers.BrosModel]]",jo,E,Ue,Xo,Oe,Zt=`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,$e,Yo,He,Wt='The <a href="/docs/transformers/main/en/model_doc/bros#transformers.BrosModel">BrosModel</a> forward method, overrides the <code>__call__</code> special method.',Ao,X,Ko,D,Jo,je,Rt="## BrosForTokenClassification[[transformers.BrosForTokenClassification]]",Fo,C,Je,et,Xe,qt=`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,De,Gt=`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,Fe,nt,Ye,Lt='The <a href="/docs/transformers/main/en/model_doc/bros#transformers.BrosForTokenClassification">BrosForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',st,Y,at,A,zo,ze,Qt="## BrosSpadeEEForTokenClassification[[transformers.BrosSpadeEEForTokenClassification]]",No,B,Ne,rt,Ae,Vt=`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,Ke,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.`,lt,z,Ee,dt,eo,Ot='The <a href="/docs/transformers/main/en/model_doc/bros#transformers.BrosSpadeEEForTokenClassification">BrosSpadeEEForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',ct,K,pt,ee,Eo,Ie,Ht="## BrosSpadeELForTokenClassification[[transformers.BrosSpadeELForTokenClassification]]",Io,U,Se,mt,oo,Xt=`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).`,ht,to,Dt=`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.`,ft,N,Ze,ut,no,Yt='The <a href="/docs/transformers/main/en/model_doc/bros#transformers.BrosSpadeELForTokenClassification">BrosSpadeELForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',gt,oe,_t,te,So,We,Zo,ao,Wo;return k=new so({props:{title:"BROS",local:"bros",headingTag:"h1"}}),T=new so({props:{title:"Overview",local:"overview",headingTag:"h2"}}),ue=new so({props:{title:"Usage tips and examples",local:"usage-tips-and-examples",headingTag:"h2"}}),_e=new Re({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}}),ye=new Re({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}}),ke=new so({props:{title:"Resources",local:"resources",headingTag:"h2"}}),Te=new so({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/main/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/main/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/main/src/transformers/models/bros/configuration_bros.py#L24"}}),H=new ro({props:{anchor:"transformers.BrosConfig.example",$$slots:{default:[sn]},$$scope:{ctx:w}}}),xe=new so({props:{title:"BrosProcessor",local:"transformers.BrosProcessor",headingTag:"h2"}}),ve=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/main/src/transformers/models/bros/processing_bros.py#L26"}}),Ce=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/main/src/transformers/models/bros/processing_bros.py#L47"}}),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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bros/modeling_bros.py#L778"}}),$e=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/main/en/model_doc/bros#transformers.BrosProcessor">BrosProcessor</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bros/modeling_bros.py#L809",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),X=new Ro({props:{$$slots:{default:[an]},$$scope:{ctx:w}}}),D=new ro({props:{anchor:"transformers.BrosModel.forward.example",$$slots:{default:[rn]},$$scope:{ctx:w}}}),Je=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bros/modeling_bros.py#L953"}}),Fe=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/main/en/model_doc/bros#transformers.BrosProcessor">BrosProcessor</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bros/modeling_bros.py#L976",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Y=new Ro({props:{$$slots:{default:[ln]},$$scope:{ctx:w}}}),A=new ro({props:{anchor:"transformers.BrosForTokenClassification.forward.example",$$slots:{default:[dn]},$$scope:{ctx:w}}}),Ne=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bros/modeling_bros.py#L1057"}}),Ee=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/main/en/model_doc/bros#transformers.BrosProcessor">BrosProcessor</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/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/main/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>
`}}),K=new Ro({props:{$$slots:{default:[cn]},$$scope:{ctx:w}}}),ee=new ro({props:{anchor:"transformers.BrosSpadeEEForTokenClassification.forward.example",$$slots:{default:[pn]},$$scope:{ctx:w}}}),Se=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bros/modeling_bros.py#L1203"}}),Ze=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/main/en/model_doc/bros#transformers.BrosProcessor">BrosProcessor</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bros/modeling_bros.py#L1227",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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